ソースを参照

Apply i18n

- ToC title and toggle symbols translatable
- translations/fr.po added
FGM 14 年 前
コミット
8e663f7c78
2 ファイル変更50 行追加3 行削除
  1. 2 3
      ah_toc.js
  2. 48 0
      translations/fr.po

+ 2 - 3
ah_toc.js

@@ -19,7 +19,7 @@
  * @return string
  */
 function ahToggleGetText(state) {
-  return state ? '[ + ]' : '[ - ]';
+  return state ? Drupal.t('[ + ]') : Drupal.t('[ - ]');
 }
 
 /**
@@ -87,11 +87,10 @@ function ahTocBuildToc() {
   $('div.ah-toc', context).remove(); 
   
   // @TODO use a theme function
-  context.prepend('<div class="ah-toc"><div class="ah-toc-title">Contents</div></div>');
+  context.prepend('<div class="ah-toc"><div class="ah-toc-title">' + Drupal.t('Table of contents') + '</div></div>');
   $('div.ah-toc').append(list);
   $('<span class="ah-toggle">' + ahToggleGetText(false) + 
     '</span>').appendTo($('div.ah-toc-title')).click(ahTocToggle);
 }
 
 $(ahTocBuildToc);
-  

+ 48 - 0
translations/fr.po

@@ -0,0 +1,48 @@
+# $Id$
+#
+# French translation of Drupal AH TOC module (general)
+# Copyright 2010 <support@osinet.fr>
+# Generated from files:
+#  ah_toc.module: n/a
+#  ah_toc.info: n/a
+#  ah_toc.js: n/a
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: AH TOC\n"
+"POT-Creation-Date: 2010-06-06 15:11+0200\n"
+"PO-Revision-Date: 2010-06-06 15:14+0100\n"
+"Last-Translator: Frederic G. MARAND <fgm@osinet.fr>\n"
+"Language-Team: OSInet <support@osinet.fr>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"X-Poedit-Language: French\n"
+"X-Poedit-Country: FRANCE\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+#: ah_toc.module:26
+msgid "The AH Table Of Contents module automatically builds a table of contents block on advanced_help pages. This building is done entirely client-side using jQuery."
+msgstr "Le module Table des Matières de l'Aide Avancée\" construit automatiquement un bloc de tables des matières sur les pages d'aide du module advanced_help. Cette construction est entièrement réalisée côté client, en jQuery."
+
+#: ah_toc.info:0
+msgid "AH TOC"
+msgstr "TdM AH"
+
+#: ah_toc.info:0
+msgid "Automatically built table of contents in Advanced Help pages"
+msgstr "Table des matières automatique sur les pages d'aide avancée"
+
+#: ah_toc.js:0
+msgid "[ + ]"
+msgstr "[ + ]"
+
+#: ah_toc.js:0
+msgid "[ - ]"
+msgstr "[ - ]"
+
+#: ah_toc.js:0
+msgid "Table of contents"
+msgstr "Table des matières"
+