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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/template/yoga/picture.tpl

    r4513 r5021  
    2929<div id="imageHeaderBar">
    3030  <div class="browsePath">
    31     <a href="{$U_HOME}" rel="home">{'home'|@translate}</a>
     31    <a href="{$U_HOME}" rel="Home">{'Home'|@translate}</a>
    3232    {if !$IS_HOME}{$LEVEL_SEPARATOR}{$SECTION_TITLE}{/if}
    3333    {$LEVEL_SEPARATOR}{$current.TITLE}
     
    4545    {/if}
    4646    {if isset($U_SLIDESHOW_STOP) }
    47       <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>
    48     {/if}
    49       <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>
     47      <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>
     48    {/if}
     49      <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>
    5050    {if isset($current.U_DOWNLOAD) }
    51       <a href="{$current.U_DOWNLOAD}" title="{'download_hint'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/save.png" class="button" alt="{'download'|@translate}"></a>
     51      <a href="{$current.U_DOWNLOAD}" title="{'download'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/save.png" class="button" alt="{'download'|@translate}"></a>
    5252    {/if}
    5353    {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
     
    5656    {/if}
    5757    {if !empty($U_SET_AS_REPRESENTATIVE) }
    58       <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>
     58      <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'representative'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/representative.png" class="button" alt="{'representative'|@translate}"></a>
    5959    {/if}
    6060    {if isset($U_ADMIN) }
    61       <a href="{$U_ADMIN}" title="{'link_info_image'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/preferences.png" class="button" alt="{'edit'|@translate}"></a>
     61      <a href="{$U_ADMIN}" title="{'edit'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/preferences.png" class="button" alt="{'edit'|@translate}"></a>
    6262    {/if}
    6363    {if isset($U_CADDIE) }{*caddie management BEGIN*}
     
    7878}{/literal}
    7979</script>
    80       <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>
     80      <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>
    8181    {/if}{*caddie management END*}
    8282  </div>
     
    9393{if isset($U_SLIDESHOW_STOP) }
    9494<p>
    95   [ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a> ]
     95  [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
    9696</p>
    9797{/if}
     
    100100
    101101{if isset($previous) }
    102 <a class="navThumb" id="linkPrev" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev">
     102<a class="navThumb" id="linkPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev">
    103103  <img src="{$previous.THUMB_SRC}" alt="{$previous.TITLE}">
    104104</a>
    105105{/if}
    106106{if isset($next) }
    107 <a class="navThumb" id="linkNext" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next">
     107<a class="navThumb" id="linkNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next">
    108108  <img src="{$next.THUMB_SRC}" alt="{$next.TITLE}">
    109109</a>
     
    169169                        {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count, $rate_summary.std) }
    170170                {else}
    171                         {'no_rate'|@translate}
     171                        {'no rate'|@translate}
    172172                {/if}
    173173                </td>
     
    178178        <tr>
    179179                <td class="label">
    180                         <span id="updateRate">{if isset($rating.USER_RATE)}{'update_rate'|@translate}{else}{'new_rate'|@translate}{/if}</span>
     180                        <span id="updateRate">{if isset($rating.USER_RATE)}{'Rate this picture'|@translate}{else}{'Rate this picture'|@translate}{/if}</span>
    181181                </td>
    182182                <td class="value">
     
    265265        <form  method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
    266266        <fieldset>
    267                 <legend>{'comments_add'|@translate}</legend>
     267                <legend>{'Add a comment'|@translate}</legend>
    268268                {if $comment_add.SHOW_AUTHOR}
    269                 <label>{'upload_author'|@translate}<input type="text" name="author"></label>
     269                <label>{'Author'|@translate}<input type="text" name="author"></label>
    270270                {/if}
    271                 <label>{'comment'|@translate}<textarea name="content" id="contentid" rows="5" cols="80">{$comment_add.CONTENT}</textarea></label>
     271                <label>{'Comment'|@translate}<textarea name="content" id="contentid" rows="5" cols="80">{$Comment_add.CONTENT}</textarea></label>
    272272                <input type="hidden" name="key" value="{$comment_add.KEY}">
    273273                <input class="submit" type="submit" value="{'Submit'|@translate}">
Note: See TracChangeset for help on using the changeset viewer.