Explorar o código

Add a note to docs about locales.js

JC Brand %!s(int64=12) %!d(string=hai) anos
pai
achega
08d69b3a3e

BIN=BIN
docs/doctrees/environment.pickle


BIN=BIN
docs/doctrees/index.doctree


+ 9 - 4
docs/html/_sources/index.txt

@@ -304,7 +304,7 @@ CSS can be minimized with Yahoo's yuicompressor tool:
 Translations
 Translations
 ============
 ============
 
 
-The gettext POT file located in ./locales/converse.pot is the template
+The gettext POT file located in ./locale/converse.pot is the template
 containing all translations and from which for each language an individual PO
 containing all translations and from which for each language an individual PO
 file is generated.
 file is generated.
 
 
@@ -327,7 +327,7 @@ You can then create or update the PO file for a specific language by doing the f
 
 
 ::
 ::
 
 
-    msgmerge ./locales/af/LC_MESSAGES/converse.po ./locales/converse.pot -U
+    msgmerge ./locale/af/LC_MESSAGES/converse.po ./locale/converse.pot -U
 
 
 This PO file is then what gets translated.
 This PO file is then what gets translated.
 
 
@@ -339,7 +339,7 @@ that we're using.
 ::
 ::
 
 
     "domain: converse\n"
     "domain: converse\n"
-    "lang: af\n",
+    "lang: af\n"
     "plural_forms: nplurals=2; plural=(n != 1);\n"
     "plural_forms: nplurals=2; plural=(n != 1);\n"
     
     
 
 
@@ -358,7 +358,7 @@ You can then convert the translations into JSON format:
 
 
 ::
 ::
 
 
-    po2json locales/af/LC_MESSAGES/converse.po locales/af/LC_MESSAGES/converse.json
+    po2json locale/af/LC_MESSAGES/converse.po locale/af/LC_MESSAGES/converse.json
 
 
 Now from converse.json paste the data as a value for the "locale_data" key in the
 Now from converse.json paste the data as a value for the "locale_data" key in the
 object in the language's .js file.
 object in the language's .js file.
@@ -383,6 +383,11 @@ create or update the file ./locale/LC_MESSAGES/de.js with the following code:
 
 
 making sure to also paste the JSON data as value to the "locale_data" key.
 making sure to also paste the JSON data as value to the "locale_data" key.
 
 
+.. Note :: 
+    If you are adding translations for a new language that is not already supported,
+    you'll have to make one more edit in ./locale/locales.js to make sure the
+    language is loaded by require.js.
+
 Congratulations, you've now succesfully added your translations. Sorry for all
 Congratulations, you've now succesfully added your translations. Sorry for all
 those hoops you had to jump through.
 those hoops you had to jump through.
 
 

+ 10 - 4
docs/html/index.html

@@ -315,7 +315,7 @@ manager, NPM.</p>
 </div>
 </div>
 <div class="section" id="translations">
 <div class="section" id="translations">
 <h1><a class="toc-backref" href="#id22">Translations</a><a class="headerlink" href="#translations" title="Permalink to this headline">¶</a></h1>
 <h1><a class="toc-backref" href="#id22">Translations</a><a class="headerlink" href="#translations" title="Permalink to this headline">¶</a></h1>
-<p>The gettext POT file located in ./locales/converse.pot is the template
+<p>The gettext POT file located in ./locale/converse.pot is the template
 containing all translations and from which for each language an individual PO
 containing all translations and from which for each language an individual PO
 file is generated.</p>
 file is generated.</p>
 <p>The POT file contains all translateable strings extracted from converse.js.</p>
 <p>The POT file contains all translateable strings extracted from converse.js.</p>
@@ -328,7 +328,7 @@ function like so:</p>
 <div class="highlight-python"><pre>make pot</pre>
 <div class="highlight-python"><pre>make pot</pre>
 </div>
 </div>
 <p>You can then create or update the PO file for a specific language by doing the following:</p>
 <p>You can then create or update the PO file for a specific language by doing the following:</p>
-<div class="highlight-python"><pre>msgmerge ./locales/af/LC_MESSAGES/converse.po ./locales/converse.pot -U</pre>
+<div class="highlight-python"><pre>msgmerge ./locale/af/LC_MESSAGES/converse.po ./locale/converse.pot -U</pre>
 </div>
 </div>
 <p>This PO file is then what gets translated.</p>
 <p>This PO file is then what gets translated.</p>
 <p>If you&#8217;ve created a new PO file, please make sure to add the following
 <p>If you&#8217;ve created a new PO file, please make sure to add the following
@@ -336,7 +336,7 @@ attributes at the top of the file (under <em>Content-Transfer-Encoding</em>). Th
 required as configuration settings for Jed, the Javascript translations library
 required as configuration settings for Jed, the Javascript translations library
 that we&#8217;re using.</p>
 that we&#8217;re using.</p>
 <div class="highlight-python"><div class="highlight"><pre><span class="s">&quot;domain: converse</span><span class="se">\n</span><span class="s">&quot;</span>
 <div class="highlight-python"><div class="highlight"><pre><span class="s">&quot;domain: converse</span><span class="se">\n</span><span class="s">&quot;</span>
-<span class="s">&quot;lang: af</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">,</span>
+<span class="s">&quot;lang: af</span><span class="se">\n</span><span class="s">&quot;</span>
 <span class="s">&quot;plural_forms: nplurals=2; plural=(n != 1);</span><span class="se">\n</span><span class="s">&quot;</span>
 <span class="s">&quot;plural_forms: nplurals=2; plural=(n != 1);</span><span class="se">\n</span><span class="s">&quot;</span>
 </pre></div>
 </pre></div>
 </div>
 </div>
@@ -348,7 +348,7 @@ following command to install it (npm being the node.js package manager):</p>
 <div class="highlight-python"><pre>npm install po2json</pre>
 <div class="highlight-python"><pre>npm install po2json</pre>
 </div>
 </div>
 <p>You can then convert the translations into JSON format:</p>
 <p>You can then convert the translations into JSON format:</p>
-<div class="highlight-python"><pre>po2json locales/af/LC_MESSAGES/converse.po locales/af/LC_MESSAGES/converse.json</pre>
+<div class="highlight-python"><pre>po2json locale/af/LC_MESSAGES/converse.po locale/af/LC_MESSAGES/converse.json</pre>
 </div>
 </div>
 <p>Now from converse.json paste the data as a value for the &#8220;locale_data&#8221; key in the
 <p>Now from converse.json paste the data as a value for the &#8220;locale_data&#8221; key in the
 object in the language&#8217;s .js file.</p>
 object in the language&#8217;s .js file.</p>
@@ -368,6 +368,12 @@ create or update the file ./locale/LC_MESSAGES/de.js with the following code:</p
 }));</pre>
 }));</pre>
 </div>
 </div>
 <p>making sure to also paste the JSON data as value to the &#8220;locale_data&#8221; key.</p>
 <p>making sure to also paste the JSON data as value to the &#8220;locale_data&#8221; key.</p>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p class="last">If you are adding translations for a new language that is not already supported,
+you&#8217;ll have to make one more edit in ./locale/locales.js to make sure the
+language is loaded by require.js.</p>
+</div>
 <p>Congratulations, you&#8217;ve now succesfully added your translations. Sorry for all
 <p>Congratulations, you&#8217;ve now succesfully added your translations. Sorry for all
 those hoops you had to jump through.</p>
 those hoops you had to jump through.</p>
 </div>
 </div>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
docs/html/searchindex.js


+ 8 - 3
docs/source/index.rst

@@ -304,7 +304,7 @@ CSS can be minimized with Yahoo's yuicompressor tool:
 Translations
 Translations
 ============
 ============
 
 
-The gettext POT file located in ./locales/converse.pot is the template
+The gettext POT file located in ./locale/converse.pot is the template
 containing all translations and from which for each language an individual PO
 containing all translations and from which for each language an individual PO
 file is generated.
 file is generated.
 
 
@@ -327,7 +327,7 @@ You can then create or update the PO file for a specific language by doing the f
 
 
 ::
 ::
 
 
-    msgmerge ./locales/af/LC_MESSAGES/converse.po ./locales/converse.pot -U
+    msgmerge ./locale/af/LC_MESSAGES/converse.po ./locale/converse.pot -U
 
 
 This PO file is then what gets translated.
 This PO file is then what gets translated.
 
 
@@ -358,7 +358,7 @@ You can then convert the translations into JSON format:
 
 
 ::
 ::
 
 
-    po2json locales/af/LC_MESSAGES/converse.po locales/af/LC_MESSAGES/converse.json
+    po2json locale/af/LC_MESSAGES/converse.po locale/af/LC_MESSAGES/converse.json
 
 
 Now from converse.json paste the data as a value for the "locale_data" key in the
 Now from converse.json paste the data as a value for the "locale_data" key in the
 object in the language's .js file.
 object in the language's .js file.
@@ -383,6 +383,11 @@ create or update the file ./locale/LC_MESSAGES/de.js with the following code:
 
 
 making sure to also paste the JSON data as value to the "locale_data" key.
 making sure to also paste the JSON data as value to the "locale_data" key.
 
 
+.. Note :: 
+    If you are adding translations for a new language that is not already supported,
+    you'll have to make one more edit in ./locale/locales.js to make sure the
+    language is loaded by require.js.
+
 Congratulations, you've now succesfully added your translations. Sorry for all
 Congratulations, you've now succesfully added your translations. Sorry for all
 those hoops you had to jump through.
 those hoops you had to jump through.
 
 

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio