Exemple #1
0
 static function show_user_profile($data)
 {
     $v = new View("user_profile_info.html");
     $fields = array("name" => t("Name"), "locale" => t("Language Preference"), "email" => t("Email"), "full_name" => t("Full name"), "url" => "Web site");
     if (!$data->user->guest) {
         $fields = array("name" => t("Name"), "full_name" => t("Full name"), "url" => "Web site");
     }
     $v->user_profile_data = array();
     foreach ($fields as $field => $label) {
         if (!empty($data->user->{$field})) {
             $value = $data->user->{$field};
             if ($field == "locale") {
                 $value = locales::display_name($value);
             }
             $v->user_profile_data[(string) $label] = $value;
         }
     }
     $data->content[] = (object) array("title" => t("User information"), "view" => $v);
 }
    <? if (!Input::instance()->get('show_all_l10n_messages')): ?>
      <a style="background-color:#fff" href="<?php 
echo url::site("admin/languages?show_all_l10n_messages=1");
?>
"><?php 
echo t("(Show all)");
?>
</a>
    <? endif; ?>
    </h2></div>
    <div class="label source"><h2><?php 
echo t("Source");
?>
</div>
    <div class="label translation"><h2><?php 
echo t("Translation to %language", array("language" => locales::display_name()));
?>
</h2></div>
  </div>
  <div id="l10n-client-string-select">
    <ul class="string-list">
      <? foreach ($string_list as $string): ?>
      <li class="<?php 
echo $string["translation"] === "" ? "untranslated" : "translated";
?>
">
        <? if (is_array($string["source"])): ?>
       [one] - <?php 
echo $string["source"]["one"];
?>
<br/>
echo t("Translating Gallery");
?>
</h3>

        <p><?php 
echo t("Follow these steps to begin translating Gallery.");
?>
</p>

        <ul>
          <li><?php 
echo t("Make sure the target language is installed and up to date (check above).");
?>
</li>
          <li><?php 
echo t("Make sure you have selected the right target language (currently %default_locale).", array("default_locale" => locales::display_name()));
?>
</li>
          <li><?php 
echo t("Start the translation mode and the translation interface will appear at the bottom of each Gallery page.");
?>
</li>
        </ul>
        <a href="<?php 
echo url::site("l10n_client/toggle_l10n_mode?csrf=" . access::csrf_token());
?>
"
           class="g-button ui-state-default ui-corner-all ui-icon-left">
          <span class="ui-icon ui-icon-power"></span>
          <?php 
if (Session::instance()->get("l10n_mode", false)) {