From 3ec5ffe24e9d1c50dcfedc1d18af01be500f8df5 Mon Sep 17 00:00:00 2001 From: Bartek Przybylski <bart.p.pl@gmail.com> Date: Sun, 15 Jan 2012 12:11:04 +0100 Subject: [PATCH] Simple translation for gallery --- apps/contacts/l10n/pl.php | 3 +++ apps/gallery/appinfo/app.php | 4 +++- apps/gallery/l10n/de.php | 5 +++++ apps/gallery/l10n/pl.php | 6 ++++++ apps/gallery/templates/index.php | 3 ++- apps/gallery/templates/view_album.php | 3 ++- 6 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 apps/gallery/l10n/de.php create mode 100644 apps/gallery/l10n/pl.php diff --git a/apps/contacts/l10n/pl.php b/apps/contacts/l10n/pl.php index 0302b0e3ee..43ee14f930 100644 --- a/apps/contacts/l10n/pl.php +++ b/apps/contacts/l10n/pl.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( +"Contacts" => "Kontakty", +"Addressbooks" => "Książki adresowe", +"Add" => "Dodaj", "This is not your addressbook." => "To nie jest twoja książka adresowa.", "Contact could not be found." => "Kontakt nie znaleziony.", "vCard could not be read." => "Nie można odczytać vCard.", diff --git a/apps/gallery/appinfo/app.php b/apps/gallery/appinfo/app.php index 9c665fd350..da87227449 100644 --- a/apps/gallery/appinfo/app.php +++ b/apps/gallery/appinfo/app.php @@ -26,6 +26,8 @@ OC::$CLASSPATH['OC_Gallery_Photo'] = 'apps/gallery/lib/photo.php'; OC::$CLASSPATH['OC_Gallery_Scanner'] = 'apps/gallery/lib/scanner.php'; OC::$CLASSPATH['OC_Gallery_Hooks_Handlers'] = 'apps/gallery/lib/hooks_handlers.php'; +$l = new OC_L10N('gallery'); + OC_App::register(array( 'order' => 20, 'id' => 'gallery', @@ -36,7 +38,7 @@ OC_App::addNavigationEntry( array( 'order' => 20, 'href' => OC_Helper::linkTo('gallery', 'index.php'), 'icon' => OC_Helper::imagePath('core', 'places/picture.svg'), - 'name' => 'Gallery')); + 'name' => $l->t('Gallery'))); class OC_GallerySearchProvider extends OC_Search_Provider{ function search($query){ diff --git a/apps/gallery/l10n/de.php b/apps/gallery/l10n/de.php new file mode 100644 index 0000000000..4ca5c83249 --- /dev/null +++ b/apps/gallery/l10n/de.php @@ -0,0 +1,5 @@ +<?php $TRANSLATIONS = array( + "Gallery" => "Galerie", + "Back" => "Zurück" +); +?> diff --git a/apps/gallery/l10n/pl.php b/apps/gallery/l10n/pl.php new file mode 100644 index 0000000000..d0c51c0f81 --- /dev/null +++ b/apps/gallery/l10n/pl.php @@ -0,0 +1,6 @@ +<?php $TRANSLATIONS = array( + "Gallery" => "Galeria", + "Rescan" => "Przeskanuj", + "Back" => "Wróć" +); +?> diff --git a/apps/gallery/templates/index.php b/apps/gallery/templates/index.php index 7c6e91a468..eb6ebd1bb7 100644 --- a/apps/gallery/templates/index.php +++ b/apps/gallery/templates/index.php @@ -2,11 +2,12 @@ OC_Util::addStyle('gallery', 'styles'); OC_Util::addScript('gallery', 'albums'); OC_Util::addScript('gallery', 'album_cover'); +$l = new OC_L10N('gallery'); ?> <div id="notification"><div id="gallery_notification_text">Creating thumbnails</div></div> <div id="controls"> - <input type="button" value="Rescan" onclick="javascript:scanForAlbums();" /> + <input type="button" value="<?php echo $l->t('Rescan');?>" onclick="javascript:scanForAlbums();" /> <br/> </div> <div id="gallery_list"> diff --git a/apps/gallery/templates/view_album.php b/apps/gallery/templates/view_album.php index 4acc965269..7e3a67df4e 100644 --- a/apps/gallery/templates/view_album.php +++ b/apps/gallery/templates/view_album.php @@ -5,6 +5,7 @@ OC_Util::addScript('gallery', 'album_cover'); OC_Util::addScript('files_imageviewer', 'jquery.mousewheel-3.0.4.pack'); OC_Util::addScript('files_imageviewer', 'jquery.fancybox-1.3.4.pack'); OC_Util::addStyle( 'files_imageviewer', 'jquery.fancybox-1.3.4' ); +$l = new OC_L10N('gallery'); ?> <script type="text/javascript"> $(document).ready(function() { @@ -15,7 +16,7 @@ OC_Util::addStyle( 'files_imageviewer', 'jquery.fancybox-1.3.4' ); </script> <div id="controls"> - <a href="?"><input type="button" value="Back" /></a> + <a href="?"><input type="button" value="<? echo $l->t('Back');?>" /></a> <br/> </div> -- GitLab