From c39a537eac541f3e3a7bd79b43dd618bf9120b4c Mon Sep 17 00:00:00 2001 From: kimitake Date: Tue, 8 Nov 2005 09:21:01 +0000 Subject: [PATCH] translating to Japanese, in progress... git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/branches/branch-3-2@130 1ca29b6e-896d-4ea0-84a5-967f57386b96 --- utf8/nucleus/plugins/NP_SkinFiles.php | 16 ++- utf8/nucleus/plugins/skinfiles/index.php | 128 ++++++++++++----------- utf8/nucleus/plugins/skinfiles/japanese-utf8.php | 104 ++++++++++++++++++ 3 files changed, 183 insertions(+), 65 deletions(-) create mode 100644 utf8/nucleus/plugins/skinfiles/japanese-utf8.php diff --git a/utf8/nucleus/plugins/NP_SkinFiles.php b/utf8/nucleus/plugins/NP_SkinFiles.php index 779db57..c48ebef 100644 --- a/utf8/nucleus/plugins/NP_SkinFiles.php +++ b/utf8/nucleus/plugins/NP_SkinFiles.php @@ -66,6 +66,16 @@ class NP_SkinFiles extends NucleusPlugin { function hasAdminArea() { return 1; } + + function init() + { + // include language file for this plugin + $language = ereg_replace( '[\\|/]', '', getLanguageName()); + if (file_exists($this->getDirectory().$language.'.php')) + include_once($this->getDirectory().$language.'.php'); + else + include_once($this->getDirectory().'english.php'); + } function event_QuickMenu(&$data) { global $member; @@ -76,12 +86,12 @@ class NP_SkinFiles extends NucleusPlugin { array_push( $data['options'], array( - 'title' => 'Skin Files', + 'title' => _SKINFILES_TITLE, 'url' => $this->getAdminURL(), - 'tooltip' => 'Manage skin files' + 'tooltip' => _SKINFILES_TOOLTIP ) ); } } -?> \ No newline at end of file +?> diff --git a/utf8/nucleus/plugins/skinfiles/index.php b/utf8/nucleus/plugins/skinfiles/index.php index 626cad5..c5bf0a7 100644 --- a/utf8/nucleus/plugins/skinfiles/index.php +++ b/utf8/nucleus/plugins/skinfiles/index.php @@ -26,7 +26,12 @@ include($strRel . 'config.php'); include($DIR_LIBS . 'PLUGINADMIN.php'); - + $language = ereg_replace( '[\\|/]', '', getLanguageName()); + $langfile = $language.'.php'; + if (file_exists($langfile)) + include_once($langfile); + else + include_once('english.php'); /** * Create admin area @@ -139,7 +144,7 @@ --> "); - echo "

Skin File Management

"; + echo "

" . _SKINFILES_MANAGEMENT . "

"; $actions = array ( 'renfile', 'renfile_process', 'delfile', 'delfile_process', @@ -353,7 +358,7 @@ $relative = sfRelativePath ($directory); - echo '

Current location: ' . sfDisplayPath($relative) . '

'; + echo '

' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative) . '

'; $dirs = array(); @@ -377,7 +382,7 @@ ksort($files); echo ''; - echo ''; + echo ''; echo ''; while (list($name, $stat) = each($dirs)) { @@ -404,17 +409,17 @@ $delUrl = $manager->addTicketToUrl($pluginUrl . '?action=deldir&dir=' . rawurlencode($dir)); echo ''; - echo ''; + echo ''; } else { echo ''; } if (is_writable($directory . $name) && sfDirectoryIsEmpty($directory . $name)) { - echo ''; + echo ''; } else { echo ''; } @@ -451,11 +456,11 @@ echo '
NameSizeLast modifiedActions' . _SKINFILES_NAME . '' . _SKINFILES_SIZE . '' . _SKINFILES_LAST_MODIFIED . '' . _SKINFILES_ACTIONS . '
' . date('M d Y, H:i', $stat['mtime']); + echo '' . date(_SKINFILES_DATE_FORMAT, $stat['mtime']); if (is_writable($directory . $name)) { - echo 'Rename' . _SKINFILES_RENAME . ' Delete' . _SKINFILES_DELETE . ' '; echo ceil($stat['size'] / 1024) . ' kB'; echo ''; - echo date('M d Y, H:i', $stat['mtime']); + echo date(_SKINFILES_DATE_FORMAT, $stat['mtime']); echo ''; if (is_writable($directory . $name)) { - echo 'Rename'; + echo '' . _SKINFILES_RENAME . ''; } else { echo ' '; } @@ -463,7 +468,7 @@ echo ''; if (is_writable($directory . $name)) { - echo 'Delete'; + echo '' . _SKINFILES_DELETE . ''; } else { echo ' '; } @@ -471,14 +476,14 @@ echo ''; if (is_writable($directory . $name) && sfAllowEditing($name)) - echo 'Edit'; + echo '' . _SKINFILES_EDIT . ''; else echo ' '; echo ''; if (is_readable ($directory . $name)) - echo 'Download'; + echo '' . _SKINFILES_DOWNLOAD . ''; else echo ' '; @@ -495,36 +500,36 @@ if (is_writable($directory)) { echo '
'; - echo '

Create a new file

'; + echo '

' . _SKINFILES_CREATE_NEW_FILE . '

'; echo '
'; $manager->addTicketHidden(); echo ''; echo ''; echo ''; - echo '

'; + echo '

'; echo '
'; echo '
'; - echo '

Upload new file

'; + echo '

' . _SKINFILES_UPLOAD_NEW_FILE . '

'; echo '
'; $manager->addTicketHidden(); echo ''; echo ''; echo ''; echo ''; - echo '

'; + echo '

'; echo '
'; } if (count($files)) { echo '
'; - echo '

Delete all files in this directory

'; + echo '

' . _SKINFILES_DEL_ALL_FILES . '

'; echo '
'; $manager->addTicketHidden(); echo ''; echo ''; - echo 'Delete all files? (will ask for confirmation)'; - echo '

'; + echo _SKINFILES_DEL_ALL_FILES_MSG; + echo '

'; echo '
'; echo '
'; } @@ -532,13 +537,13 @@ if (is_writable($directory)) { echo '
'; - echo '

Create a new directory

'; + echo '

' . _SKINFILES_CREATE_NEW_DIR . '

'; echo '
'; $manager->addTicketHidden(); echo ''; echo ''; echo ''; - echo '

'; + echo '

'; echo '
'; echo '
'; } @@ -563,8 +568,8 @@ $relative = sfRelativePath ($directory); $editUrl = $manager->addTicketToUrl($pluginUrl . '?action=rendir&dir=' . rawurlencode($relative . $file)); - echo '

Current location: ' . sfDisplayPath($relative); - echo ''; + echo '

' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative); + echo ''; echo ' ' . $file . '

'; echo '
'; @@ -573,17 +578,17 @@ echo ''; echo ''; - echo '

Rename directory «' . htmlspecialchars($file) . '» to:

'; + echo '

' . _SKINFILES_RENAME_DIR_MSG . ' «' . htmlspecialchars($file) . '» ' . _SKINFILES_RENAME_DIR_MSG2 . '

'; echo '

'; - echo '

'; - echo '

'; + echo '

'; + echo '

'; echo ''; echo '
'; } else { - echo "

Error: The directory «" . htmlspecialchars($file) . "» does not exist "; - echo "or you do not have permission to rename the directory

"; + echo "

" . _SKINFILES_ERR_DIR_DOES_NOT_EXIST1 . " «" . htmlspecialchars($file) . "» " . _SKINFILES_ERR_DIR_DOES_NOT_EXIST2; + echo _SKINFILES_ERR_DIR_DOES_NOT_EXIST3 . "

"; } } @@ -603,30 +608,29 @@ $name = requestVar('name'); if ($name == '') { - echo "

Error: Could not rename the directory «" . htmlspecialchars($file) . "» "; - echo "because no new name was supplied.

"; + echo "

" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR1 . "«" . htmlspecialchars($file) . "» "; + echo _SKINFILES_ERR_COULD_NOT_RENAME_DIR2 . "

"; _skinfiles_rendir($name); return; } if (sfIllegalFilename($name)) { - echo "

Error: Could not rename the directory «" . htmlspecialchars($file) . "» "; - echo "because the supplied name contains one or more illegal characters

"; + echo "

" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR3 . "«" . htmlspecialchars($file) . "» "; + echo _SKINFILES_ERR_COULD_NOT_RENAME_DIR4 . "

"; _skinfiles_rendir($name); return; } if ($name == $file) { - echo "

Error: Could not rename the directory «" . htmlspecialchars($file) . "» "; - echo "because the supplied name is the same as the original name. Please use a different name.

"; + echo "

" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR5 . "«" . htmlspecialchars($file) . "» "; + echo _SKINFILES_ERR_COULD_NOT_RENAME_DIR6 . _SKINFILES_ERR_COULD_NOT_RENAME_DIR7 . "

"; _skinfiles_rendir($name); return; } if (file_exists($directory . $name)) { - echo "

Error: Could not rename the directory «" . htmlspecialchars($file) . "» "; - echo "because the supplied name is already used by another file or directory. Consider using a different name, or "; - echo "delete the existing file or directory first

"; + echo "

" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR8 . "«" . htmlspecialchars($file) . "» "; + echo _SKINFILES_ERR_COULD_NOT_RENAME_DIR9 . _SKINFILES_ERR_COULD_NOT_RENAME_DIR10 . "

"; _skinfiles_rendir($name); return; } @@ -731,8 +735,8 @@ $relative = sfRelativePath ($directory); $delUrl = $manager->addTicketToUrl($pluginUrl . '?action=deldir&dir=' . rawurlencode($relative . $file)); - echo '

Current location: ' . sfDisplayPath($relative); - echo ''; + echo '

' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative); + echo ''; echo ' ' . $file . '

'; echo '
'; @@ -741,9 +745,9 @@ echo ''; echo ''; - echo '

Delete directory «' . htmlspecialchars($file) . '»?

'; - echo '

'; - echo '

'; + echo '

' . _SKINFILES_DELETE_DIR . ' «' . htmlspecialchars($file) . '»?

'; + echo '

'; + echo '

'; echo '
'; } @@ -824,7 +828,7 @@ $relative = sfRelativePath ($directory); $emptyUrl = $manager->addTicketToUrl($pluginUrl . '?action=emptydir&dir=' . rawurlencode($relative . $file)); - echo '

Current location: ' . sfDisplayPath($relative); + echo '

' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative); echo ''; echo ' ' . $file . '

'; @@ -834,7 +838,7 @@ echo ''; echo ''; - echo '

Delete the following files from directory «' . htmlspecialchars($file) . '»?

'; + echo '

' . _SKINFILES_DELETE_FILE_MSG . ' «' . htmlspecialchars($file) . '»?

'; if (count($files)) { @@ -842,13 +846,13 @@ foreach ($files as $name) { echo '
  • ' . htmlspecialchars($name) . '
  • '; } echo ''; - echo '

    '; - echo '

    '; + echo '

    '; + echo '

    '; } else { echo '

    There are currently no files in this directory that can be deleted

    '; - echo '

    '; + echo '

    '; } echo '
    '; @@ -970,7 +974,7 @@ $relative = sfRelativePath ($directory); $viewUrl = $manager->addTicketToUrl($pluginUrl . '?action=viewfile&file=' . rawurlencode(sfRelativePath($directory . $file))); - echo '

    Current location: ' . sfDisplayPath($relative); + echo '

    ' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative); echo ''; echo ' ' . $file . '

    '; @@ -1110,7 +1114,7 @@ $relative = sfRelativePath ($directory); $editUrl = $manager->addTicketToUrl($pluginUrl . '?action=editfile&file=' . rawurlencode(sfRelativePath($directory . $file))); - echo '

    Current location: ' . sfDisplayPath($relative); + echo '

    ' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative); echo ''; echo ' ' . $file . '

    '; @@ -1122,13 +1126,13 @@ echo ''; echo ''; - echo '

    Edit file «' . htmlspecialchars($file) . '»

    '; + echo '

    ' . _SKINFILES_EDIT_FILE_MSG . ' «' . htmlspecialchars($file) . '»

    '; echo '

    '; - echo '

    '; - echo '

    '; + echo '

    '; + echo '

    '; echo ''; echo '
    '; } @@ -1199,8 +1203,8 @@ $relative = sfRelativePath ($directory); $editUrl = $manager->addTicketToUrl($pluginUrl . '?action=renfile&file=' . rawurlencode(sfRelativePath($directory . $file))); - echo '

    Current location: ' . sfDisplayPath($relative); - echo ''; + echo '

    ' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative); + echo ''; echo ' ' . $file . '

    '; echo '
    '; @@ -1211,8 +1215,8 @@ echo '

    Rename file «' . htmlspecialchars($file) . '» to:

    '; echo '

    '; - echo '

    '; - echo '

    '; + echo '

    '; + echo '

    '; echo ''; echo '
    '; } @@ -1366,8 +1370,8 @@ $relative = sfRelativePath ($directory); $delUrl = $manager->addTicketToUrl($pluginUrl . '?action=delfile&file=' . rawurlencode(sfRelativePath($directory . $file))); - echo '

    Current location: ' . sfDisplayPath($relative); - echo ''; + echo '

    ' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative); + echo ''; echo ' ' . $file . '

    '; echo '
    '; @@ -1376,9 +1380,9 @@ echo ''; echo ''; - echo '

    Delete file «' . htmlspecialchars($file) . '»?

    '; - echo '

    '; - echo '

    '; + echo '

    ' . _SKINFILES_DELETE_FILE . ' «' . htmlspecialchars($file) . '»?

    '; + echo '

    '; + echo '

    '; echo '
    '; } @@ -1488,4 +1492,4 @@ -?> \ No newline at end of file +?> diff --git a/utf8/nucleus/plugins/skinfiles/japanese-utf8.php b/utf8/nucleus/plugins/skinfiles/japanese-utf8.php new file mode 100644 index 0000000..4954bfa --- /dev/null +++ b/utf8/nucleus/plugins/skinfiles/japanese-utf8.php @@ -0,0 +1,104 @@ + -- 2.11.0