Ignore:
Timestamp:
Mar 2, 2010, 3:54:22 PM (14 years ago)
Author:
nikrou
Message:

Feature 1451 : localization with gettext
Use php-gettext (developpement version rev43, because of php5.3) as fallback
Use native language (english) instead of key for translation
Keep directory en_UK for english customization
Need some refactoring for plurals

Todo : managing plugins in the same way

Location:
trunk/template-extension/distributed/samples
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/template-extension/distributed/samples/my-picture.tpl

    r3283 r5021  
    2222<div id="imageHeaderBar">
    2323  <div class="browsePath">
    24     <a href="{$U_HOME}" rel="home">{'home'|@translate}</a>
     24    <a href="{$U_HOME}" rel="Home">{'Home'|@translate}</a>
    2525    {if !$IS_HOME}{$LEVEL_SEPARATOR}{$SECTION_TITLE}{/if}
    2626    {$LEVEL_SEPARATOR}{$current.TITLE}
     
    3939    {/if}
    4040    {if isset($U_SLIDESHOW_STOP) }
    41       <a href="{$U_SLIDESHOW_STOP}" title="{'slideshow_stop'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_slideshow.png" class="button" alt="{'slideshow_stop'|@translate}"></a>
     41      <a href="{$U_SLIDESHOW_STOP}" title="{'stop the slideshow'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_slideshow.png" class="button" alt="{'stop the slideshow'|@translate}"></a>
    4242    {/if}
    43       <a href="{$U_METADATA}" title="{'picture_show_metadata'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/metadata.png" class="button" alt="metadata"></a>
     43      <a href="{$U_METADATA}" title="{'Show file metadata'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/metadata.png" class="button" alt="metadata"></a>
    4444    {if isset($current.U_DOWNLOAD) }
    45       <a href="{$current.U_DOWNLOAD}" title="{'download_hint'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/save.png" class="button" alt="{'download'|@translate}"></a>
     45      <a href="{$current.U_DOWNLOAD}" title="{'download'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/save.png" class="button" alt="{'download'|@translate}"></a>
    4646    {/if}
    4747    {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
     
    5050    {/if}
    5151    {if !empty($U_SET_AS_REPRESENTATIVE) }
    52       <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as category representative'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/representative.png" class="button" alt="{'representative'|@translate}"></a>
     52      <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'representative'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/representative.png" class="button" alt="{'representative'|@translate}"></a>
    5353    {/if}
    5454    {if isset($U_ADMIN) }
    55       <a href="{$U_ADMIN}" title="{'link_info_image'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/preferences.png" class="button" alt="{'edit'|@translate}"></a>
     55      <a href="{$U_ADMIN}" title="{'edit'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/preferences.png" class="button" alt="{'edit'|@translate}"></a>
    5656    {/if}
    5757    {if isset($U_CADDIE) }{*caddie management BEGIN*}
     
    7272}{/literal}
    7373</script>
    74       <a href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'add to caddie'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"></a>
     74      <a href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'caddie'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"></a>
    7575    {/if}{*caddie management END*}
    7676  </div>
     
    8787{if isset($U_SLIDESHOW_STOP) }
    8888<p>
    89   [ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a> ]
     89  [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
    9090</p>
    9191{/if}
     
    9494
    9595{if isset($previous) }
    96 <a class="navThumb" id="linkPrev" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev">
     96<a class="navThumb" id="linkPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev">
    9797  <img src="{$previous.THUMB_SRC}" alt="{$previous.TITLE}">
    9898</a>
    9999{/if}
    100100{if isset($next) }
    101 <a class="navThumb" id="linkNext" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next">
     101<a class="navThumb" id="linkNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next">
    102102  <img src="{$next.THUMB_SRC}" alt="{$next.TITLE}">
    103103</a>
  • trunk/template-extension/distributed/samples/titling_categories.tpl

    r3282 r5021  
    2929          <a href="{$cat.URL}">
    3030            <img src="{$cat.TN_SRC}" alt="{$cat.ALT}"
    31             title="{'hint_category'|@translate}">
     31            title="{'shows images at the root of this category'|@translate}">
    3232          </a>
    3333        </div>
Note: See TracChangeset for help on using the changeset viewer.