diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-08-09 17:54:02 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-08-10 14:03:54 +0200 |
commit | 9059b559791b9f5333c24815c4bfd77cc6201c5e (patch) | |
tree | f0b0ca5d7f60707650d81dac2c2a61091d7c2709 /files | |
parent | 32be4746f8514e06e838b4aa0ee45cb832df1b2c (diff) | |
download | nextcloud-server-9059b559791b9f5333c24815c4bfd77cc6201c5e.tar.gz nextcloud-server-9059b559791b9f5333c24815c4bfd77cc6201c5e.zip |
make more strings translatable
Diffstat (limited to 'files')
-rw-r--r-- | files/appinfo/app.php | 4 | ||||
-rw-r--r-- | files/js/filelist.js | 2 | ||||
-rw-r--r-- | files/js/files.js | 14 | ||||
-rw-r--r-- | files/l10n/xgettextfiles | 5 | ||||
-rw-r--r-- | files/templates/index.php | 14 | ||||
-rw-r--r-- | files/templates/part.list.php | 2 |
6 files changed, 22 insertions, 19 deletions
diff --git a/files/appinfo/app.php b/files/appinfo/app.php index a4cec3d6ec2..94cd43ab0a2 100644 --- a/files/appinfo/app.php +++ b/files/appinfo/app.php @@ -1,7 +1,9 @@ <?php +$l=new OC_L10N('files'); + OC_App::register( array( "order" => 2, "id" => "files", "name" => "Files" )); -OC_App::addNavigationEntry( array( "id" => "files_index", "order" => 1, "href" => OC_Helper::linkTo( "files", "index.php" ), "icon" => OC_Helper::imagePath( "files", "home.png" ), "name" => "Files" )); +OC_App::addNavigationEntry( array( "id" => "files_index", "order" => 1, "href" => OC_Helper::linkTo( "files", "index.php" ), "icon" => OC_Helper::imagePath( "files", "home.png" ), "name" => $l->t("Files") )); ?> diff --git a/files/js/filelist.js b/files/js/filelist.js index ce9595d3495..4a34385fd0b 100644 --- a/files/js/filelist.js +++ b/files/js/filelist.js @@ -168,7 +168,7 @@ FileList={ procesSelection(); FileList.deleteCanceled=false; FileList.deleteFiles=files; - $('#notification').text('undo deletion'); + $('#notification').text(t('files','undo deletion')); $('#notification').fadeIn(); }, finishDelete:function(ready,sync){ diff --git a/files/js/files.js b/files/js/files.js index 49e7cecd090..519d48a523d 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -137,7 +137,7 @@ $(document).ready(function() { if(files[i].size>0){ var size=files[i].size; }else{ - var size='Pending'; + var size=t('files','Pending'); } FileList.addFile(files[i].name,size,date,true); } @@ -306,8 +306,8 @@ function procesSelection(){ var selectedFolders=selected.filter(function(el){return el.type=='dir'}); if(selectedFiles.length==0 && selectedFolders.length==0){ $('#headerName>span.name').text('Name'); - $('#headerSize').text('Size MB'); - $('#modified').text('Modified'); + $('#headerSize').text(t('files','Size MB')); + $('#modified').text(t('files','Modified')); $('th').removeClass('multiselect'); $('.selectedActions').hide(); $('thead').removeClass('fixed'); @@ -336,9 +336,9 @@ function procesSelection(){ var selection=''; if(selectedFolders.length>0){ if(selectedFolders.length==1){ - selection+='1 folder'; + selection+='1 '+t('files','folder'); }else{ - selection+=selectedFolders.length+' folders'; + selection+=selectedFolders.length+' '+t('files','folders'); } if(selectedFiles.length>0){ selection+=' & '; @@ -346,9 +346,9 @@ function procesSelection(){ } if(selectedFiles.length>0){ if(selectedFiles.length==1){ - selection+='1 file'; + selection+='1 '+t('files','file'); }else{ - selection+=selectedFiles.length+' files'; + selection+=selectedFiles.length+' '+t('files','files'); } } $('#headerName>span.name').text(selection); diff --git a/files/l10n/xgettextfiles b/files/l10n/xgettextfiles new file mode 100644 index 00000000000..9e22680e455 --- /dev/null +++ b/files/l10n/xgettextfiles @@ -0,0 +1,5 @@ +../appinfo/app.php +../templates/index.php +../templates/part.list.php +../js/filelist.js +../js/files.js diff --git a/files/templates/index.php b/files/templates/index.php index bb58f5e754a..27af6665dfe 100644 --- a/files/templates/index.php +++ b/files/templates/index.php @@ -8,13 +8,13 @@ <input type="hidden" class="max_human_file_size" value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)"> <input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir"> <div class="file_upload_wrapper"> - <input type="submit" class="file_upload_filename" value="Upload (max. <?php echo $_['uploadMaxHumanFilesize'];?>)"/> + <input type="submit" class="file_upload_filename" value="<?php echo $l->t('Upload');?> (max. <?php echo $_['uploadMaxHumanFilesize'];?>)"/> <input class="file_upload_start" type="file" name='files[]'/> </div> <iframe name="file_upload_target_1" class='file_upload_target' src=""></iframe> </form> <form id="file_newfolder_form"> - <input type="text" name="file_newfolder_name" id="file_newfolder_name" value="" placeholder="New Folder" /> + <input type="text" name="file_newfolder_name" id="file_newfolder_name" value="" placeholder="<?php echo $l->t('New Folder')?>" /> </form> </div> <div id="file_action_panel"> @@ -29,12 +29,12 @@ <input type="checkbox" id="select_all" /> <span class='name'><?php echo $l->t( 'Name' ); ?></span> <span class='selectedActions'> - <a href="" title="Download" class="download"><img class='svg' alt="Download" src="../core/img/actions/download.svg" /></a> + <a href="" title="<?php echo $l->t('Download')?>" class="download"><img class='svg' alt="Download" src="../core/img/actions/download.svg" /></a> <!--<a href="" title="" class="share">Share</a>--> </span> </th> <th id='headerSize'><?php echo $l->t( 'Size MB' ); ?></th> - <th id='headerDate'><span id="modified"><?php echo $l->t( 'Modified' ); ?></span><span class='selectedActions'><a href="" title="Delete" class="delete"><img class='svg' alt="Delete" src="../core/img/actions/delete.svg" /></a></span></th> + <th id='headerDate'><span id="modified"><?php echo $l->t( 'Modified' ); ?></span><span class='selectedActions'><a href="" title="Delete" class="delete"><img class='svg' alt="<?php echo $l->t('Delete')?>" src="../core/img/actions/delete.svg" /></a></span></th> </tr> </thead> <tbody id="fileList"> @@ -42,14 +42,10 @@ </tbody> </table> -<div id="uploadsize-message" title="Upload too large"> +<div id="uploadsize-message" title="<?php echo $l->t('Upload too large')?>"> <p> <?php echo $l->t( 'The files you are trying to upload exceed the maximum size for file uploads on this server.' ); ?> </p> </div> -<div id="delete-confirm" title=""> - <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>These items will be permanently deleted and cannot be recovered. Are you sure?</p> -</div> - <span id="file_menu"/> diff --git a/files/templates/part.list.php b/files/templates/part.list.php index 5051c19949a..8b3823f391b 100644 --- a/files/templates/part.list.php +++ b/files/templates/part.list.php @@ -1,4 +1,4 @@ - <span id="emptyfolder" <?php if(count($_['files'])) echo 'style="display:none;"';?>>Nothing in here. Upload something!</span> + <span id="emptyfolder" <?php if(count($_['files'])) echo 'style="display:none;"';?>><?php echo $l->t('Nothing in here. Upload something!')?></span> <?php foreach($_['files'] as $file): $simple_file_size = simple_file_size($file['size']); $simple_size_color = intval(200-$file['size']/(1024*1024)*2); // the bigger the file, the darker the shade of grey; megabytes*2 |