diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:15 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:15 -0500 |
commit | 4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch) | |
tree | d4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/de/mozilla/localization | |
parent | 33058f2b292b3a581333bdfb21b8f671898c5060 (diff) | |
download | translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2 translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip |
initial commit
Diffstat (limited to 'files/de/mozilla/localization')
7 files changed, 1216 insertions, 0 deletions
diff --git a/files/de/mozilla/localization/index.html b/files/de/mozilla/localization/index.html new file mode 100644 index 0000000000..54d427c2de --- /dev/null +++ b/files/de/mozilla/localization/index.html @@ -0,0 +1,25 @@ +--- +title: Lokalisation bei Mozilla +slug: Mozilla/Localization +tags: + - Landing + - Localization + - Mozilla + - NeedsTranslation + - TopicStub + - Translation + - l10n +translation_of: Mozilla/Localization +--- +<p><span class="seoSummary"><strong>Localization</strong> (L10n) ist die Übersetzung der Benutzeroberfläche von einer Sprache in die andere, um diese so einer anderen Sprache und Kultur anzupassen. Diese Quellen stehen jedem zur Verfügung, der sich für die technischen Aspekte der L10n interessiert - Entwicklern und Helfern</span></p> + +<h2 id="Siehe_auch">Siehe auch</h2> + +<dl> + <dt><a href="/de/docs/MDN/Contribute/Localize">Lokalisieren von MDN</a></dt> + <dd>Diese Ressource beinhaltet die Lokalization der Dokumentation hier bei MDN.</dd> + <dt><a href="/en-US/Apps/Build/Localization">App localization</a></dt> + <dd>Diese Sammlung von Dokumenten bezieht sich genauer auf das Lokalisieren von Apps, inklusive Firefox OS apps.</dd> + <dt><a href="/en-US/docs/Web/API/L10n">L10n</a></dt> + <dd>Referenzdokumente für die L10n API, die Mozilla für das Lokalisieren von Firefox OS nutzt.</dd> +</dl> diff --git a/files/de/mozilla/localization/kodierung_fuer_lokalisierungs-dateien/index.html b/files/de/mozilla/localization/kodierung_fuer_lokalisierungs-dateien/index.html new file mode 100644 index 0000000000..46b60bbf1f --- /dev/null +++ b/files/de/mozilla/localization/kodierung_fuer_lokalisierungs-dateien/index.html @@ -0,0 +1,137 @@ +--- +title: Kodierungen für Lokalisierungsdateien +slug: Mozilla/Localization/Kodierung_fuer_Lokalisierungs-Dateien +tags: + - Internationalisierung + - Lokalisierung +translation_of: Mozilla/Localization/Encodings_for_localization_files +--- +<p>Beim Erstellen einer Lokalisierung für Mozilla Produkte ist es wichtig die Kodierung der Dateien zu beachten, die man generiert.</p> + +<p>Im Allgemeinen sind Dateien im Mozilla Repository UTF-8 kodiert. Es gibt allerdings einige wenige Ausnahmen.</p> + +<h3 id="Installer" name="Installer">Installer</h3> + +<p>Der Windows Installer unterstützt UTF-8 nicht, sondern nur die von Windows vorgegebenen Zeichensatztabellen. Die Einbindung in den Erstellungsprozess ist kompliziert, daher hier einige Hinweise: </p> + +<table class="fullwidth-table"> + <tbody> + <tr> + <td class="header">Datei</td> + <td class="header">Kodierung</td> + <td class="header">Hinweise</td> + </tr> + <tr> + <td>toolkit/installer/windows/charset.mk</td> + <td>ASCII</td> + <td>Die Variable WIN_INSTALLER_CHARSET muss eine Kodierung haben, die mit dem Parameter CHARSET= aus toolkit/installer/windows/install.it übereinstimmt. Geeignete Werte siehe in der Tabelle unten. </td> + </tr> + <tr> + <td>toolkit/installer/windows/install.it</td> + <td> + <p>Eine Zeichensatztabelle von Windows. Der Parameter CHARSET= in dieser Datei und der Parameter WIN_INSTALLER_CHARSET in der Datei charset.mk müssen mit dem Zeichensatz übereinstimmen.</p> + </td> + <td>Die Parameter FONTNAME/FONTSIZE/CHARSET in dieser Datei müssen geeigete Werte haben. Für die meisten westlichen Zeichensätze sind die Werte "MS Sans Serif" und "8" sinnvolle Standardwerte. Für östliche Schriftsätze müssen geeignete Schriftarten aus dem Lieferumfang von Windows ausgewählt werden. Geeignete Werte für den Parameter CHARSET= siehe in der Tabelle unten.</td> + </tr> + <tr> + <td>browser/installer/installer.inc</td> + <td>UTF-8</td> + <td> </td> + </tr> + <tr> + <td>toolkit/installer/unix/install.it</td> + <td>UTF-8</td> + <td>{{ Deprecated_inline() }}</td> + </tr> + </tbody> +</table> + +<h4 id="Native_Windows_encodings" name="Native_Windows_encodings">Native Windows-Kodierungen</h4> + +<p>Die nachfolgende Tabelle beinhaltet native Windows-Kodierungen und die jeweiligen Werte für WIN_INSTALLER_CHARSET und CHARSET=:</p> + +<table class="standard-table"> + <tbody> + <tr> + <td class="header">Kodierungsbezeichnung</td> + <td class="header">WIN_INSTALLER_CHARSET (charset.mk)</td> + <td class="header">CHARSET= (windows/install.it)</td> + </tr> + <tr> + <td>ANSI_CHARSET</td> + <td>CP1252</td> + <td>0</td> + </tr> + <tr> + <td>BALTIC_CHARSET</td> + <td>CP1257</td> + <td>186</td> + </tr> + <tr> + <td>CHINESEBIG5_CHARSET</td> + <td>CP950</td> + <td>136</td> + </tr> + <tr> + <td>EASTEUROPE_CHARSET</td> + <td>CP1250</td> + <td>238</td> + </tr> + <tr> + <td>GB2312_CHARSET</td> + <td>CP936</td> + <td>134</td> + </tr> + <tr> + <td>GREEK_CHARSET</td> + <td>CP1253</td> + <td>161</td> + </tr> + <tr> + <td>HANGUL_CHARSET</td> + <td>CP949</td> + <td>129</td> + </tr> + <tr> + <td>RUSSIAN_CHARSET</td> + <td>CP1251</td> + <td>204</td> + </tr> + <tr> + <td>SHIFTJIS_CHARSET</td> + <td>CP932</td> + <td>128</td> + </tr> + <tr> + <td>TURKISH_CHARSET</td> + <td>CP1254</td> + <td>162</td> + </tr> + <tr> + <td>VIETNAMESE_CHARSET</td> + <td>CP1258</td> + <td>163</td> + </tr> + <tr> + <td colspan="3"><strong>Windows Sprachversionen Middle East</strong>:</td> + </tr> + <tr> + <td>ARABIC_CHARSET</td> + <td>CP1256</td> + <td>178</td> + </tr> + <tr> + <td>HEBREW_CHARSET</td> + <td>CP1255</td> + <td>177</td> + </tr> + <tr> + <td colspan="3"><strong>Windows Sprachversionen Thai</strong>:</td> + </tr> + <tr> + <td>THAI_CHARSET</td> + <td>CP874</td> + <td>222</td> + </tr> + </tbody> +</table> diff --git a/files/de/mozilla/localization/localization_content_best_practices/index.html b/files/de/mozilla/localization/localization_content_best_practices/index.html new file mode 100644 index 0000000000..d5b4c70dfc --- /dev/null +++ b/files/de/mozilla/localization/localization_content_best_practices/index.html @@ -0,0 +1,324 @@ +--- +title: Localization content best practices +slug: Mozilla/Localization/Localization_content_best_practices +translation_of: Mozilla/Localization/Localization_content_best_practices +--- +<div class="summary"> +<p> </p> + +<p><span class="seoSummary">Dieses Dokument stellt Entwicklern bewährte Methoden zum Erstellen von standortabhängigem Code bereit und beschreibt wie man häufige Fehler, bei der Lokalisierbarkeit verhindert.</span></p> +</div> + +<div class="blockIndicator note"> +<p><strong>Note</strong>: If you're a localizer and you want to contribute to the localization of Mozilla products, you might want to read our <a href="/en-US/docs/Mozilla/Localization/Quick_start_guide">Localization quick start guide</a> for information on localizing Mozilla code.</p> +</div> + +<h2 id="Note_on_localizers">Note on localizers</h2> + +<p>Mozilla localizers a volunteers with very diverse technical skills: some of them rely exclusively on translation tools, others prefer to work directly with text editors and don't have problems working with VCS systems.</p> + +<p>It's important to consider this when adding strings, and especially localization comments for strings that contain references, or obscure technical details.</p> + +<h2 id="Localization_files">Localization files</h2> + +<h3 id="Choose_good_key_IDs">Choose good key IDs</h3> + +<p>The IDs (names) chosen for your keys, regardless of the file format, should always be descriptive of the string, and its role in the interface (button label, title, etc.). Think of them as long variable names. When you have to change a key ID, adding a progressive number to the existing key should always be used as a last resort. For example, suppose this string needs to be changed from "Event" to "Add New Event":</p> + +<pre>new-event-header = Event</pre> + +<p><code>add-new-event-header</code> is definitely a better choice for the new string than <code>new-event-header1</code>.</p> + +<p>If a string is tied to an accesskey or a tooltip, use string IDs that highlight this relation:</p> + +<pre>neweventbtn.label = Add event +neweventbtn.accesskey = A +neweventbtn.tooltip = Add a new event +</pre> + +<h3 id="Don't_duplicate_IDs">Don't duplicate IDs</h3> + +<p>If you're adding new strings, check that you're not duplicating an existing ID. Depending on the parser logic, one of these two translations will be ignored.</p> + +<h3 id="Add_localization_notes">Add localization notes</h3> + +<p>Localizers usually work on the localizable files without the context of the source files including the localized strings; it is important to add comments to the localizable files themselves, too. These comments are generally referred to as localization notes.</p> + +<p>Don't forget to add a localization note when:</p> + +<ul> + <li>Part of the string is not supposed to be localized (for example, the name of an HTML attribute in a warning).</li> + <li>String includes variables: always explain what will be the value of these variables at run-time.</li> + <li>English could be ambiguous. For example: <code>bookmark</code>. Is this a noun or a verb? Using meaningful IDs could also help in these cases.</li> + <li>Strings are used in a specific context. For example accessibility (a11y) strings: in this case space is less important than clarity, since these strings are not displayed in the UI but used by tools like screen readers.</li> +</ul> + +<p>There is an established format for localization comments: it's important to follow the format as closely as possible, since there are a number of automated tools that parse these comments for easier access and use by localizers.</p> + +<h4 id="DTD_files">DTD files</h4> + +<pre class="eval language-html"><!-- LOCALIZATION NOTE (entity name): \{{privacy}} will be replaced at run-time by an + active link. the string 'privacy-link' will be used as text for this link. --> +</pre> + +<h4 id="Properties_files">Properties files</h4> + +<pre class="eval language-html"># LOCALIZATION NOTE(privacy-text): \{{privacy}} will be replaced at run-time by an +# active link. the string 'privacy-link' will be used as text for this link. +privacy-text = By proceeding you accept the \{{privacy}}. +privacy-link = Privacy Terms +</pre> + +<p>File-wide comments should use the same format, they should be at the top of the file (after the license header) and just drop the <em>(entity name/key)</em> reference.</p> + +<h3 id="Land_good_quality_strings">Land good quality strings</h3> + +<ul> + <li>Don't land temporary strings. If you already know that your strings are temporary, they shouldn't be exposed to the localization process. This would waste everybody's time and create unnecessary frustration: localizers have to translate strings that are destined to change, developers will need to <a href="#Changing_existing_strings">use new IDs</a> later to update them.</li> + <li>If you're reviewing a patch, check also strings for grammar errors, capitalization or inconsistencies. For example, use the single Unicode …, and not three dots. If you have any doubts about the quality of strings, ask a copywriter to do a copy review of this text. Ideally, all strings landing in code should originate from approved UX wireframes, any copy review should be part of the initial stage of creating these wireframes.</li> +</ul> + +<h4 id="Use_Unicode_characters_over_their_ASCII_counterparts_when_possible">Use Unicode characters over their ASCII counterparts when possible</h4> + +<p>Strings should use directional quotation marks when possible.</p> + +<ul> + <li>U+2018 and U+2019 (\u2018 and \u2019 in JavaScript) are the left and right single quotation marks, respectively. The right single quotation mark should be used as an apostrophe.</li> + <li>U+201C and U+201D (\u201c and \u201d in JavaScript) are the left and right double quotation marks, respectively. The pair should be used to surround statements and references to user input. + <ul> + <li>Example: You have chosen a keyword that is currently in use by “%S”. Please select another.</li> + <li>Example: Search %1$S for “%2$S”</li> + </ul> + </li> +</ul> + +<p>Non-directional single, and double, quotation marks should be used in reference to HTML code, or other languages where ASCII character usage is required, such as HTML. <em>HTML does not prefer one over the other, and our codebase uses them interchangeably as of March 2016.</em></p> + +<ul> + <li>Example: This web page at <span id='malware_sitename'/> has been reported as an attack page and has been blocked based on your security preferences.</li> +</ul> + +<p>U+2026 (\u2026) is the horizontal ellipsis character. This character should be used in place of three consecutive periods.</p> + +<h2 id="Create_localizable_strings">Create localizable strings</h2> + +<h3 id="Don't_assume_grammar_structures">Don't assume grammar structures</h3> + +<p>You need to consider the need for different grammar structures in different locales, and add switching mechanisms to present them appropriately. You shouldn't make assumptions as to what those structures will be: instead, let locales/localizers decide. When in doubt, ask the localizers.</p> + +<h4 id="Date_and_time_formats">Date and time formats</h4> + +<p>For example, you shouldn't hard code date formats into applications:</p> + +<pre>%A, %b %e +// resulting in Wednesday, May 20</pre> + +<p>This is fine in English, but in Italian results in "Mercoledì, Mag 20", which sounds unnatural. Every time you use this kind of structure, you should have a localizable string behind it, and let localizers decide the best order for their language.</p> + +<h4 id="Units">Units</h4> + +<p>Another example is localizing percentages or units. Some locales use a space between the number and the % symbol, some don't, some use a non-breaking space.</p> + +<h4 id="Splitting">Splitting</h4> + +<p>Splitting sentences into several keys often inadvertently presumes a grammar, a sentence structure, and such composite strings are often very difficult to translate. When a composite string is needed, try to give the translators "room to move".</p> + +<h4 id="Word_Order">Word Order</h4> + +<p>If a string will contain a placeholder, always add the placeholder to the string to allow the localizer to change the word order if necessary. For example, it might seem ok in English to present the strings <code>[username] says: </code>to localizers simply as <code>says:</code> but this will cause serious issues in many other languages as the agent of an action often will not come in front of the verb, but some other position. For example in Irish/Gaelic the correct order is <code>be [username] at saying:</code>. If a placeholder is present, this can be correctly localized as <code>Tá %s ag rádh:</code> but not without.</p> + +<p>Similarly, if the UI string is <code>Flash Version</code>, do not simply present the translator with <code>Version </code>for translation. Present the whole string or, if there is a significant need for a placeholder, use a placeholder. the word Version may have to go before or after <code>Flash </code>and one or both may need to be inflected.</p> + +<h4 id="Idiom">Idiom</h4> + +<p>Idiom, in a loose sense, also has an impact on localization if it leads to strings being prepared in a way that renders them unlocalizable. For example, in English all the following begin with the same clause: <code>The URL of this feed is invalid; The URL of this feed cannot be reached; The URL of this feed cannot be parsed</code>. It might be tempting to 'save time' by presenting this as <code>The URL of this feed %s</code> and then <code>is invalid; cannot be reached</code> and <code>cannot be parsed</code>. However, linguistically these are different types of sentences and will be handled differently in other languages. This is usually not a case of translator choice but obligatory in the language. For example, in Gaelic these sentences must be translated as <code>Tha URL an inbhir seo mì-dhligheach;Cha ruig sinn URL an inbhir seo</code> and <code>Cha ghabh URL an inbhir seo a pharsadh</code>.</p> + +<div class="blockIndicator geckoVersionNote"> +<p>Unless there are significant savings of translation volume involved, it is usually easier and quicker for translators to handle these as fixed strings rather than composed strings, especially considering the time needed for locating, checking and potentially fixing composed strings.</p> +</div> + +<h4 id="Case_and_inflections">Case and inflections</h4> + +<p>(Also see section on Placeholders)</p> + +<p>Many languages have features like noun classes (i.e. nouns belonging to different categories and are treated differently by the grammar), case and inflections (changes are made to a word to indicate differences in meaning or use) and so on. In modern English, such features are rare and are mainly restricted to plural <code>-s</code> and verb forms (e.g. <code>go > went</code> is a form of inflection). Examples from other languages:</p> + +<ul> + <li>Gender in German: nouns can be either masculine, feminine or neuter. The most obvious impact is that the definite article which in English is always <code>the </code>can either be <code>der, die</code> or <code>das</code>. To complicate matters, if the grammatical context changes, the article will change: <code><span style="background-color: #add8e6;">Der</span> Text</code> 'the text' changes to <code>Wollen Sie <span style="background-color: #add8e6;">den</span> Text speichern?</code> 'Do you want to save the text?'</li> + <li>Suffixes in Basque: where English tends to use expressions such as 'to the' or 'from the', Basque adds an ending to a word to express the same concept. For example <code><span style="background-color: #add8e6;">From the</span> menu</code> in Basque is <code>Menu<span style="background-color: #add8e6;">tik</span> </code>and <code><span style="background-color: #add8e6;">To the</span></code><code> printers</code> is <code>Inprimagailu<span style="background-color: #add8e6;">ei</span></code>.</li> +</ul> + +<div class="blockIndicator geckoVersionNote"> +<p><strong>Implication:</strong> Using placeholders for something like 'the text' or 'the file' works well in English but is likely to cause severe headaches for localizers if the placeholders cannot be inflected.</p> +</div> + +<h3 id="Use_proper_plural_forms">Use proper plural forms</h3> + +<p>Firefox supports proper <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals">plural forms</a>. As a native English speaker, you might find it natural to use</p> + +<pre>delete-cookie = Delete cookie +delete-cookies = Delete cookies +</pre> + +<p>In Firefox this should be</p> + +<pre class="language-html"># LOCALIZATION NOTE (delete-cookies): Semi-colon list of plural forms. +# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals +# #1 is the number of cookies to delete +# example: +delete-cookies = Delete #1 cookie;Delete #1 cookies</pre> + +<div class="blockIndicator geckoVersionNote"> +<p><strong>Important:</strong> always include the localization note with this format if you use a plural form in Firefox. This comment is used by tools to identify strings with plural forms.</p> +</div> + +<p>One last advice: never use plural form as a replacement for single/multiple conditional. See {{ Bug("658191") }} for more details.</p> + +<h3 id="Use_ordered_variables_in_string_with_multiple_variables">Use ordered variables in string with multiple variables</h3> + +<p>Consider this string from /browser:</p> + +<pre>generalSiteIdentity=This website is owned by %S\nThis has been verified by %S</pre> + +<p>First thing: always add a localization comment explaining what these variables mean, even if it seems obvious. Using multiple <code>%S</code> give the impression that the order of variables if fixed, which is actually not.</p> + +<pre># LOCALIZATION NOTE(generalSiteIdentity): %1$S is the owner of the current website, +# %2$S is the name of the Certification Authority signing the certificate. +generalSiteIdentity=This website is owned by %1$S\nThis has been verified by %2$S</pre> + +<h3 id="Avoid_concatenations_use_placeholders_instead">Avoid concatenations, use placeholders instead</h3> + +<p>Consider this string:</p> + +<pre>tos-text = By proceeding you accept the +tos-link = Terms of Services +</pre> + +<p>Most developers would consider this a good solution and display the concatenation of <code>tos-text+tos-link</code>, with an active link on the second part. Unfortunately, this won't work at all: you need at least a third string to place after the link, without that some languages won't be able to create a natural sounding sentence.<br> + <br> + A much more flexible solution would be:</p> + +<pre># LOCALIZATION NOTE(tos-text): \{{link}} will be replaced at run-time +# by an active link. String with ID 'tos-link' will be used as text +# for this link. +tos-text = By proceeding you accept the \{{link}} +tos-link = Terms of Services</pre> + +<p>And then replace <code>\{{link}}</code> at run-time with the second string. Note also the localization comments and make sure it is clear to the localizer which placeholder string will appear in lieu of the placeholder as this may affect translation and/or inflection. For example, <code>By proceeding you accept the \{{Terms of Service}}</code> will result in the Gaelic translation <code>Ma leanas tu air adhart, bidh tu a' gabhail ri \{{teirmichean na seirbheise}}</code>. But in another grammatical context, <code>\{{Terms of Service}}</code> may require a different inflection, for example <code>\{{<span style="background-color: #add8e6;">th</span>eirmichean na seirbheise}}</code>. So if the localizer is left unsure as to which string goes into which placeholder, this may lead to bad translations.</p> + +<h3 id="Don't_reuse_strings_in_different_contexts">Don't reuse strings in different contexts</h3> + +<p>This is particularly important for mobile, where different context often means different font and available space for the string. For example, if you're adding a new menu item in Settings on Android, don't use the same string for the menu item and the following screen header.</p> + +<p>Another example, some locales use nouns for titles, and verbs for actions (for example button labels). Sometimes they coincide with English, but they rarely do in other languages. Take <code>Bookmark</code>: it can be both a noun and a verb in English. A developer could be tempted to reuse the same string "Bookmark" in the button to add a bookmark, and in the header for the next dialog. This won't work in some languages.</p> + +<h3 id="Avoid_unnecessary_complexity_in_strings">Avoid unnecessary complexity in strings</h3> + +<p>Consider this string:</p> + +<pre class="brush: html">privacy-link = <p>By proceeding you accept the <a href="https://www.mozilla.org/privacy" class="external">Privacy Terms</a>.</p></pre> + +<p>In this case, you shouldn't put the URL inside the localization string, unless you need it to be localizable. If you change the URL, you're going to need a new string ID; the same goes for the anchor's attributes, or the paragraph markup. Instead, you should use the following strings</p> + +<pre># LOCALIZATION NOTE(privacy-text): \{{link}} will be replaced at run-time +# by an active link. String with ID 'privacy-link' will be used as text +# for this link. +privacy-text = By proceeding you accept the \{{link}}. +privacy-link = Privacy Terms</pre> + +<p>And then replace <code><code>{</code>{link}}</code> at run-time with the link.</p> + +<h3 id="Don't_hardcode_characters">Don't hardcode characters</h3> + +<p>Typically white spaces, commas, or other separators (":", "|").</p> + +<p>If you need a trailing white space in a string, use the Unicode character \u0020 (that's usually a bad sign, you're concatenating it to another string). At some point, someone will accidentally trim that whitespace.</p> + +<h3 id="Remove_unused_strings">Remove unused strings</h3> + +<p>If you're removing features, don't leave around unused strings in the .properties file.</p> + +<h3 id="Tooltips">Tooltips</h3> + +<p>If a string is used as a tooltip, it should not end in a period (in English). Tooltips are never written in imperative mood but infinitive mood instead. Hence the proper absence of periods to indicate this isn't just a matter of consistency for en-US, as it is also vital info for localizers.</p> + +<h3 id="Menu_and_control_labels">Menu and control labels</h3> + +<p>The labels on controls and menu titles, menu option strings, and so forth should not end in periods (in English). These are generally not complete sentences, but instead, phrases that convey the idea of a concept or action. Therefore, for both correctness and consistency within en-US, please leave out the trailing periods for these items. This also helps with localization.</p> + +<h3 id="Developer_tools_key_shortcuts">Developer tools key shortcuts</h3> + +<p>When translating Firefox strings from /devtools/ folder, you may see some keys like this:</p> + +<pre class="sourcelines"><span class="difflineplus" id="l8.16">inspector.searchHTML.key=CmdOrCtrl+F</span></pre> + +<p>The first part of the string `<em>CmdOrCtrl</em>` should not be translated. You may only translate the letter to better match your locale. This key shortcut definition matches the <a href="https://github.com/electron/electron/blob/master/docs/api/accelerator.md">Electron key shortcut definition</a>.</p> + +<h2 id="Create_localizable_UI">Create localizable UI</h2> + +<h3 id="CSS_issues">CSS issues</h3> + +<p>Some CSS text/font properties may cause problems with text legibility when applied to certain language texts.</p> + +<ul> + <li>Avoid using Italic for CJKT. This acronym stands for: <span class="st">Chinese (Simplified and Traditional), Japanese, Korean, and Taiwanese</span>.</li> + <li>The {{ cssxref("text-transform") }} property is not reliable for some locales; for example, <code>text-transform: uppercase</code> won't work properly with languages such as Irish/Gaelic. For example, <code>App Size</code> in English may be capitalized via <code>text-transform: uppercase</code> to <code>APP SIZE</code> but in Gaelic this would change <code>Meud na h-aplacaid</code> to <code>MEUD NA H-APLACAID</code> which violates the locales orthographic rules, as it ought to be <code>MEUD NA hAPLACAID</code>. In general, localizers should make the decision about capitalization. If you want to display <code>WARNING</code>, add a string with that capitalization, and explain it in the localization note.</li> +</ul> + +<h3 id="Design_for_50">Design for +50%</h3> + +<p>Bear in mind that English strings will likely be a lot shorter than their international equivalents, so you need to leave some space in your UI to allow for this. Some examples:</p> + +<ul> + <li><code>OK</code> in English becomes <code>Ceart ma-thà</code> in Gaelic.</li> + <li><code>Save document?</code> in English becomes <code>A bheil thu airson an sgrìobhainn a shàbhaladh</code> in Gaelic.</li> +</ul> + +<p>Another good example is Yes/No. There are two types of languages, those that have Yes/No as a single word, and those that don't and work on mirroring the verb. For example, a <code>Do you want to open the page?</code> > <code>Yes/No</code> dialog works in English, but in Gaelic/Irish/Welsh and several other languages the equivalent answer is <code>Want/Not want</code>.</p> + +<p>W3C has a good <a href="http://www.w3.org/International/articles/article-text-size">guide</a> on the length ratios a developer should be prepared for.</p> + +<h2 id="Test_localizability">Test localizability</h2> + +<p>As a developer, you should always test your patches not just for code errors, but also for localizability issues in case they involve string or UI changes.</p> + +<h3 id="Gecko_and_mozilla-central">Gecko and mozilla-central</h3> + +<p>First, make sure that there are no hard-coded strings, and all strings are available in localization files (.dtd, .properties). One possible way to test a patch for localizability issues is to alter the en-US localization files, adding extraneous characters to the original strings: this can help to identify both hard-coded strings and "flexibility issues" in the UI.</p> + +<h2 id="Changing_existing_strings">Changing existing strings</h2> + +<h3 id="Updating_Entity_Names">Updating Entity Names</h3> + +<p>If you are changing a string such that its meaning has changed, you must update the entity or property name for the string to match the new meaning. If your changes are relevant only for English — for example, to correct a typographical error or to make letter case consistent — then there is generally no need to update the entity name.</p> + +<p>Changing the string ID will invalidate the existing translation, the new string will be reported as missing in all tools, and localizers will have to retranslate it. Given the diversity of tools used by localization teams, this is the only reliable method to ensure that localizers update existing localizations.</p> + +<p>If you change the entity or property name of a string, you must also update all instances where that entity or property name is used in the source code, including localization comments.</p> + +<p>If you change the entity or property name of a string, and the string has an accompanying access key, command key, or tooltip, you should update their names as well for consistency. This change is fundamental for access keys, since many localization tools use the entity name to connect an access key to its label. For example, to check if it's using a character not available in the original string, given entities "useBookmark.label" and "useBookmark.accesskey", if you change to "chooseBookmark.label" due to a string change, change the access key entity to "chooseBookmark.accesskey" to match it.</p> + +<h3 id="String_freeze">String freeze</h3> + +<p>Some repositories are considered to be <em>string-frozen</em>. This means that string changes are not allowed to land, and each case must be evaluated before landing. As a general rule, it's recommended to fix strings on the trunk/master repository, and create ad-hoc patches for string frozen repositories that don't involve string changes. Note that even removing strings is considered a breakage.</p> + +<p>In the case of Firefox and Thunderbird, string frozen repositories are: mozilla-aurora, mozilla-beta, mozilla-release.</p> + +<h2 id="Bugzilla_and_l10n">Bugzilla and l10n</h2> + +<h3 id="Do_I_need_l10n_feedback">Do I need l10n feedback?</h3> + +<p>Feedback from <a href="https://wiki.mozilla.org/L10n:Mozilla_Team">l10n-drivers</a> is not necessary for each landing involving strings, as long as you're following the basic rules described in this document. If you have doubts about the localizability of some text or structure (not about the text itself, that would need copywriters), it's definitely good to ask feedback.</p> + +<h3 id="Keywords_l12y_late-l10n">Keywords: l12y, late-l10n</h3> + +<p>Two keywords are generally used on Bugzilla:</p> + +<ul> + <li>l12y: it's used to track "localizability" bugs. A bug marked with l12y describes an issue that prevents localizers to create a good quality localization. Some examples: hard-coded strings, implicit grammar structure in the code, lack of plural forms support, UI that breaks with long strings, etc.</li> + <li>late-l10n: it's used by release-drivers to identify bugs, involving new strings, that will land late in the cycle, typically after soft string freeze in Firefox OS.</li> +</ul> + +<h3 id="Alias_l10n">Alias :l10n</h3> + +<p>The :l10n alias on Bugzilla (community@localization.bugs) is followed by some localizers and it could be CC'd to gather opinions from the wider l10n community (no point in opening NEEDINFO or requiring actions from this alias). There is also a <a href="https://lists.mozilla.org/listinfo/dev-l10n">dev-l10n mailing list</a> and a #l10n channel on IRC, they might be a good place to ask questions.</p> diff --git a/files/de/mozilla/localization/lokalisierung_mit_mercurial/index.html b/files/de/mozilla/localization/lokalisierung_mit_mercurial/index.html new file mode 100644 index 0000000000..6f7835ed1b --- /dev/null +++ b/files/de/mozilla/localization/lokalisierung_mit_mercurial/index.html @@ -0,0 +1,252 @@ +--- +title: Lokalisierung mit Mercurial +slug: Mozilla/Localization/Lokalisierung_mit_Mercurial +translation_of: Mozilla/Localization/Localizing_with_Mercurial +--- +<p>Für Mozillla verwenden wir das Versionskontrollsystem von <a href="../../../../en/Mercurial_basics" rel="internal">Mercurial</a> (Hg) zur Verwaltung des Quellcodes und der Lokalisierungen. Mit Mercurial können Lokalisierer lokal arbeiten (auf dem eigenen Rechner) und dann die Änderungen an ein Remote-Repository hochladen (<code style="font-size: 14px;">push</code>), das überlicherweise auf den Mozilla-Servern (<a class="external" href="http://hg.mozilla.org/" title="http://hg.mozilla.org/">hg.mozilla.org</a>) gehostet wird. Für die Lokalisierung aktueller Versionen von Firefox, Thunderbird und SeaMonkey wird Mercurial verwendet. Falls die Dokumentation unvollständig ist oder du Fragen hast, schau bitte bei den <a href="irc://irc.mozilla.org/l10n" title="irc://irc.mozilla.org/l10n">#l10n</a>- oder <a href="irc://irc.mozilla.org/hg" title="irc://irc.mozilla.org/hg">#hg</a>-Kanälen oder auf irc.mozilla.org vorbei. Es lohnt sich auch die <a class="internal" href="/en/Mercurial_FAQ" title="En/Mercurial FAQ">Mercurial FAQ</a> zu lesen, falls du auf ein Problem stoßen solltest.</p> + +<p>Für die Motivierten und Schnellen unter euch folgen hier Anweisungen zur Installation und Konfiguration von Mercurial, eine Anleitung dazu, wie man Hochlade-Rechte für seinen Hg-Account erhält und einige Aufgaben, die ohne Account-Rechte erfüllt werden können.</p> + +<h2 id="Mercurial_installieren">Mercurial installieren</h2> + +<p>Befolge die nachfolgenden Anweisungen um Mercurial auf deinem System zu installieren. Sobald du mit der Installation von Mercurial fertig bist, zeigen wir dir Schritt für Schritt wie man Mercurial <a href="/en/Mercurial_FAQ#Configuration" title="en/Mercurial FAQ#Configuration">konfiguriert</a>.</p> + +<h3 id="Mercurial_unter_Linux">Mercurial unter Linux</h3> + +<p>Mit einem der folgenden Befehle ist es ganz einfach möglich Mercurial aus der Befehlszeile heraus zu installieren. Wähle den zu deiner Distribution passenden Befehl aus und stelle sicher, dass das Terminal als <em>root</em> läuft.</p> + +<pre># Debian/ubuntu +$ apt-get install mercurial + +# Fedora +$ yum install mercurial + +# Gentoo +$ emerge mercurial + +# Arch Linux +$ pacman -S mercurial + +# OpenSolaris +$ pkg install SUNWmercurial +</pre> + +<p>Wenn du eine grafische Oberfläche bevorzugst kannst du <a href="http://javaforge.com/project/HGE">MercurialEclipe hier herunterladen und istallieren</a>.</p> + +<h4 id="Hat_es_funktioniert">Hat es funktioniert?</h4> + +<p>Öffne ein Terminalfenster und gib folgenden Befehl ein: <code>hg --version</code>. Wenn eine Meldung mit der Version von Mercurial erscheint (z. B. <code>Mercurial Distributed SCM (version 1.3.1)</code>), war die Installation von Mercurial erfolgreich.</p> + +<h4 id="Weitere_Details">Weitere Details</h4> + +<p>Weitere Details zur Installation von Hg auf Linus-Systemen findest in den <a href="https://www.mercurial-scm.org/downloads">Anweisungen auf der Download-Seite von Mercurial</a>. </p> + +<h3 id="Mercurial_unter_Windows">Mercurial unter Windows</h3> + +<p>Unter Windows gibt es zwei Möglichkeiten zur Installation:</p> + +<ul> + <li>Herunterladen und installieren des {{ interwiki("wikimo", "MozillaBuild") }}-Paketes für eine <strong>Befehlszeilenschnittstelle</strong>. So wird nicht nur Hg installiert, sondern auch alle Tools, die für die Erstellung von Mozilla-Produkten unter Windows benötigt werden. trust us, you'll want this eventually.</li> + <li><a href="/@api/deki/files/3863/=TortoiseHg.png" title="TortoiseHg.png"><img alt="TortoiseHg.png" class="internal rwrap" src="/@api/deki/files/3863/=TortoiseHg.png?size=thumb" style="float: right; height: 115px; width: 160px;"></a>Installieren von <a class="external" href="http://tortoisehg.bitbucket.org/" title="http://tortoisehg.bitbucket.org/">TortoiseHg</a> für eine <strong>grafische Oberfläche</strong>. TurtoiseHg wird in die Windows Explorer-Shell integriert und installiert zusätzlich das Befehlszeilenprogramm.</li> +</ul> + +<p><a href="/@api/deki/files/3861/=Mercurial_Installer.png" title="Mercurial Installer.png"><img alt="Mercurial Installer.png" class="internal rwrap" src="/@api/deki/files/3861/=Mercurial_Installer.png?size=thumb" style="float: right; height: 125px; width: 160px;"></a>Bei derr Befehlszeileninstallation von Hg unter Windows ist es wichtig sicherzustellen, dass sich die ausführbare Datei von <code>hg</code> in der Variable <code>%PATH%</code> des Systems befindet (für TortoiseHg is dieser Schritt nicht nötig). Verwende das Hilfsprogramm <code>add_path.exe</code>, das unter <code>C:\mozilla-build\hg</code> zu finden ist, um diesen Schritt auszuführen.</p> + +<pre>PS C:\Users\your_id> cd C:\mozilla-build\hg +PS C:\mozilla-build\hg> .\add_path.exe /result . +</pre> + +<p>Beachte, dass der Punkt ("<code>.</code>") am Ende des zweiten Befehl für das <em>aktuelle Verzeichnis</em> steht. Wenn das Hilfsprogramm <code><em>%PATH%</em></code> erfolgreich modifiziert hat, öffnet sich ein Dialog mit der Meldung "<em><code>%PATH%</code> wurde korrekt aktualisiert</em>".</p> + +<p>Alternativ kann die Variable <code><em>%PATH%</em></code> auch manuell bearbeitet werden. Klicke hierfür mit der rechten Maustaste auf den Eintrag Computer im Startmenü, gehe zu <code>Eigenschafte > Erweitert > Umgebungsvariablen</code>, wähle <code>PATH</code> und klicke auf <code>Bearbeiten</code>. Wenn xx in der Auswahl nicht angezeigt wird, musst du auf <code>Hinzufügen</code> klicken und die Bearbeitung innerhalb des Dialogs <strong>Hinzufügen</strong> vornehmen (Beispiel siehe Screenshot).<br> + <a href="/@api/deki/files/3862/=PATH.jpg" title="PATH.jpg"><img alt="PATH.jpg" class="internal rwrap" src="/@api/deki/files/3862/=PATH.jpg?size=thumb" style="float: right; height: 71px; width: 160px;"></a></p> + +<h4 id="Hat_es_funktioniert_2">Hat es funktioniert?</h4> + +<ol> + <li>Gehe zu <code>Start > Ausführen...</code></li> + <li>Gib <code>cmd.exe</code> ein und klicke auf <code>OK</code>. Ein neues Shell-Fenster sollte erscheinen.</li> + <li>Gib im neuen Shell-Fenster <code>hg --version</code> ein. Wenn eine Meldung mit der Version von Mercurial erscheint (z. B. <code>Mercurial Distributed SCM (version 1.3.1)</code>), war die Installation von Mercurial erfolgreich.</li> +</ol> + +<h4 id="Weitere_Details_2" style="font-size: 14px;">Weitere Details</h4> + +<p>Weitere Details zur Installation von Hg unter Windows findest in den <a href="https://www.mercurial-scm.org/downloads">Anweisungen auf der Download-Seite von Mercurial</a>.</p> + +<h3 id="Mercurial_unter_Mac_OSX">Mercurial unter Mac OSX</h3> + +<p>Die Installation von Hg unter Mac OSX ist sehr einfach. Mit Hilfe von <a class="external" href="http://www.macports.org/" title="http://www.macports.org/">MacPorts</a> kann Mercurial über das Terminal mit folgendem Befehl installiert werden:</p> + +<p><code>$ sudo port install mercurial</code></p> + +<p>Es ist außerdem möglich Mercurial über die dmg-Datei von der <a href="http://mercurial.selenic.com/wiki/Download#Mac_OS_X" title="http://mercurial.selenic.com/wiki/Download#Mac_OS_X">Hg Download-Seite</a> zu installieren. Hier wird man über einen Installations-Dialog Schritt für Schritt durch den Prozess geleitet.</p> + +<p>Wenn du eine grafische Oberfläche bevorzugst, kannst du <a href="http://javaforge.com/project/HGE">MercurialEclipse hier herunterladen und installieren</a>.</p> + +<h4 id="Hat_es_funktioniert_3">Hat es funktioniert?</h4> + +<p>Öffne ein Terminal-Fenster und gib folgenden Befehl ein: <code>hg --version</code>. Wenn eine Meldung mit der Version von Mercurial erscheint (z. B. <code>Mercurial Distributed SCM (version 1.3.1)</code>), war die Installation von Mercurial erfolgreich.</p> + +<h4 id="Weitere_Details_3" style="font-size: 14px;">Weitere Details</h4> + +<p>Weitere Details zur Installation von Hg unter Mac OSX findest in den <a href="https://www.mercurial-scm.org/downloads">Anweisungen auf der Download-Seite von Mercurial</a>.</p> + +<h2 id="Mercurial_konfigurieren">Mercurial konfigurieren</h2> + +<p>Sobald Mercurial installiert wurde, muss es konfiguriert werden, um genutzt werden zu können.</p> + +<p>Die Mercurial-Konfiguration befindet sich in einer config-Datei, die du selbst erstellen musst. Je nach Betriebssystem heißt die config-Datei entweder <code style="font-size: 14px; color: rgb(51, 51, 51);">~/.hgrc</code> (UNIX-Systeme) oder <code style="font-size: 14px; color: rgb(51, 51, 51);">Mercurial.ini</code> (Windows).</p> + +<p>Die config-Datei sollte die folgenden Einstellungen haben:</p> + +<pre class="eval">[ui] +username = Your Real Name <<a class="link-mailto" href="mailto:user@example.com" rel="external" title="mailto:user@example.com">user@example.com</a>> +merge = internal:merge + +[defaults] +commit = -v + +[diff] +git = 1 +showfunc = 1 +unified = 8</pre> + +<p>Befolge folgende Schritte für die Konfiguration von Hg: </p> + +<ol> + <li>Erstelle eine neue Datei in einem Texteditor deiner Wahl. </li> + <li>Kopiere die Einstellungen oben und füge sie in diese neue Datei ein. </li> + <li>Speichere die Datei entweder unter dem Namen <code>.hgrc</code> (UNIX-Systeme) oder <code>Mercurial.ini</code> (Windows) und lege Sie in unter <code>$HOME/</code> oder <code>C:\mozilla-build\hg\</code> or <code>C:\Program Files\Mercurial\</code> ab.</li> +</ol> + +<p>Wenn die Installation und Konfiguration von Hg abgeschlossen ist, gibt es einige Aufgaben die ohne Upload-Rechte für Hg ausgeführt werden können. </p> + +<h2 id="Repositorys_klonen_und_aktualisieren">Repositorys klonen und aktualisieren</h2> + +<p>Es gibt ein paar Repositorys mit en-US Quelldateien, die für die meisten Localea relevant sind:</p> + +<ul> + <li><a class="external" href="https://hg.mozilla.org/mozilla-central/" title="https://hg.mozilla.org/mozilla-central/">mozilla-central</a> beinhaltet Dateien für Firefox Nightly.</li> + <li><a class="external" href="https://hg.mozilla.org/comm-central/" title="https://hg.mozilla.org/comm-central">comm-central</a> beinhaltet Dateien für SeaMonkey und Thunderbird, die nicht auch schon Teil von Firefox sind. </li> + <li><a href="https://hg.mozilla.org/l10n-central/" title="https://hg.mozilla.org/l10n-central/">l10n-central</a> beinhaltet alle L10n-Repositrys für Firefox Nightly.</li> +</ul> + +<div class="note"> +<p>Wenn man das comm-central Repository erstellt, beinhaltet dieses auch das mozilla-central repository. Es ist also möglich, das für die Entwicklung von Firefox, SeaMonkey und Thunderbird konfigurierte Repository zu verwenden, ohne mozilla-central ein weiteres Mal anlegen zu müssen. </p> +</div> + +<p>So erstellt (oder klont) man die en-US Quelldateien beim ersten Mal:</p> + +<ul> + <li>Führe den folgenden Befehl in der Kommandozeile aus, um die en-US Quelldateien für Firefox zu erhalten:</li> +</ul> + +<pre class="eval">hg clone https://hg.mozilla.org/mozilla-central/ +</pre> + +<p>So wird das mozilla-central Repository ins Verzeichnis mozilla-central geklont.</p> + +<ul> + <li>Führe die folgenden Befehle in der Kommandozeile aus, um die en-US Quelldateien für Firefox, SeaMonkey und/oder Thunderbird zu erhalten:</li> +</ul> + +<pre>hg clone https://hg.mozilla.org/comm-central/ +cd comm-central +python client.py checkout +</pre> + +<p>Der erste Befehl erstellt einen Klon des comm-central Repositorys. Der zweite Befehl führt dich zu diesem Verzeichnis. Der dritte Befehl erstellt einen Klon von mozilla-central und legt einige weitere hg-Repositorys an. Die anderen Verzeichnisse werden für SeaMonkey und Thunderbird benötigt.</p> + +<ul> + <li>Das erstmalige Klonen des Lokalisierungs-Repositorys ist genauso einfach. Um beispielsweise das Firefox Nightly L10N Repository zu klonen, führe folgenden Befehl aus und ersetze ab-CD mit dem Code deiner Locale.</li> +</ul> + +<pre class="eval" style="font-size: 14px;">hg clone https://hg.mozilla.org/l10n-central/ab-CD/</pre> + +<h3 id="Lokale_Repositorys_aktualisieren">Lokale Repositorys aktualisieren</h3> + +<ul> + <li>Um deine Arbeitskopie von mozilla-central zu aktualisieren, gehe zum lokalen mozilla-central Verzeichnis und führe folgenden Befehl aus:</li> +</ul> + +<pre class="eval">hg pull -u +</pre> + +<p>Dieser Befehl ruft neue Changesets von mozilla-central ab und wendet diese Änderungen auf deine Arbeitskopie an.</p> + +<ul> + <li>Um deine Arbeitskopie von comm-central zu aktualisieren, gehe zum lokalen comm-central Verzeichnis und führe folgenden Befehl aus:</li> +</ul> + +<pre>python client.py checkout</pre> + +<p>Dieser Befehl ruft neue Changesets von comm-central, mozilla-central und anderen passenden Repositorys ab und wendet diese Änderungen auf deine Arbeitskopie an.</p> + +<ul> + <li>Um das lokale L10n Repository nach dem ersten Klonen zu aktualieren, führe folgenden Befehl aus dem lokalen L10n-Verzeichnis aus:</li> +</ul> + +<pre style="font-size: 14px;">hg pull -u</pre> + +<h2 id="L10n-Patches_erstellen">L10n-Patches erstellen</h2> + +<p>Another thing you can do with Hg without needing account priviledges is creating L10n patches of your work for someone else to commit to your remote L10n repo on the Mozilla servers. Doing this ensures that your dashboards are always accurate, as they look at your remote repo.</p> + +<p>Here's how to create a L10n patch with Hg and the <a href="http://mercurial.selenic.com/wiki/MqExtension" title="http://mercurial.selenic.com/wiki/MqExtension">Mq extension</a>:</p> + +<ol> + <li>Enable Mq by adding <code>hg.ext = </code> to your Mercurial config file (<code>~/.hgrc</code> on Unix-like systems or <code>Mercurial.ini</code> on Windows) under the <code>[extensions]</code> section.</li> + <li>Open your command line tool and navigate to your L10n directory.</li> + <li>Inside your L10n directory, init your repo with Mq by running <code>hg init --mq</code>.</li> + <li>To create a new patch, run <code>hg qnew -m "Your commit message" patch-name.patch</code>. The commit message should take the form of "Bug 123456 - Change this thing to work better by doing something; r=reviewers" if you are to fix a bug.</li> + <li>Make your change.</li> + <li>Once you finish making your change, run <code>hg qrefresh</code> to commit your changes to the patch.</li> + <li>Navigate to your <code><repository>/.hg/patches</code> to find your <code>.patch</code>.</li> + <li>You may repeat from step 4 to create another patch. Your patches will be incremental, i.e. new patches are created based on old patches. If you want to commit all the patches to the repository and cleanup the patch queue, run <code>hg qfinish</code>.</li> +</ol> + +<p>Please refer to <a href="http://mercurial.selenic.com/wiki/MqTutorial" title="http://mercurial.selenic.com/wiki/MqTutorial">MqTutorial</a> and <a href="http://mercurial.selenic.com/wiki/MqExtension" title="http://mercurial.selenic.com/wiki/MqExtension">Mq documentation</a> for further uses of Mq extension to manage patches.</p> + +<h2 id="Mercurial_account_priviledges">Mercurial account priviledges</h2> + +<p>Eventually, you or your team leader will need Hg account priviledges. Let's face it, it's just more convenient to commit and push your work to the remote repo yourself, rather than creating patches and asking someone else to push them for you.</p> + +<p>To get write access to the l10n hg repositories on the Mozilla server,<a class="external" href="http://www.mozilla.org/hacking/commit-access-policy/" title="http://www.mozilla.org/hacking/commit-access-policy/"> there's a bit of paper work to be done</a>. The localization team owner needs to <a class="link-https" href="https://bugzilla.mozilla.org/enter_bug.cgi?product=mozilla.org&component=Repository%20Account%20Requests&rep_platform=All&op_sys=All&cc=l10n%40mozilla.com&short_desc=l10n%20hg%20account%20for%20John%20Doe%20(ab-CD)" title="https://bugzilla.mozilla.org/enter_bug.cgi?product=mozilla.org&component=Repository%20Account%20Requests&rep_platform=All&op_sys=All&cc=l10n%40mozilla.com&short_desc=l10n%20hg%20account%20for%20John%20Doe%20(ab-CD)">file a bug requesting an hg account</a>. This bug will request level 1 L10n priviledges. You need to follow the instructions regarding the <a class="external" href="http://www.mozilla.org/hacking/committer/" title="http://www.mozilla.org/hacking/committer/">contributor form</a>. Write access to the hg repositories requires a ''voucher'', which, for the owner, will be done based on the review by Mozilla. For peers of a localization, the owner can vouch (once she or he is registered).</p> + +<h2 id="Pull_your_locale" name="Pull_your_locale">Sending changes to Mozilla</h2> + +<p>Now that you have Hg account privileges, you can send your work to Mozilla all by yourself. Here are the steps to send your L10n work using Mercurial:</p> + +<ol> + <li>Since your L10n work takes place in your own local repository, you should ensure that there are no changes made to the remote repository before committing your work. To do this, <a href="https://developer.mozilla.org/en-US/docs/Localizing_with_Mercurial#Updating_your_local_repos" title="https://developer.mozilla.org/en-US/docs/Localizing_with_Mercurial#Updating_your_local_repos">update your locale, as per the section above</a>.</li> + <li>After finishing a change or set of changes and checking you have updated to the latest, you should commit by entering this command:</li> +</ol> + +<pre class="eval">hg commit -m "your message identifying the change (bug 555)"</pre> + +<p>Committing won’t send your changes to Mozilla’s repository, but prepares them for it. The next step will send your changes to your remote repo via <code>push</code>.</p> + +<ol start="3"> + <li>To push to mozilla-hosted repositories, you have to have committer access, and you must edit the file <code><em>(your-local-hg-root AKA the directory you pulled your locale into)</em>/.hg/hgrc</code> (note, this is <strong>NOT</strong> your <code>~/.hgrc</code>) to add these lines (replacing ab-CD with your locale code):</li> +</ol> + +<pre class="eval">[paths] +default = https://hg.mozilla.org/l10n-central/ab-CD/ +default-push = ssh://hg.mozilla.org/l10n-central/ab-CD/ +</pre> + +<ol start="4"> + <li>You’ll also need to tell ssh which account to use for your pushes, too, by editing <code>~/.ssh/config</code> and adding these lines, where <code style="font-size: 14px; color: rgb(51, 51, 51);">user@host.domain</code> is your account:</li> +</ol> + +<pre>Host hg.mozilla.org +User user@host.domain +</pre> + +<ol start="5"> + <li>Now you can push your work to the repository (and check the result on the dashboard) by entering this command from your local directory:</li> +</ol> + +<pre class="eval">hg push</pre> + +<p id="A_.mozconfig">And tah dah! You're done! Congratulations on finishing the tutorial. Take a break and grab a snack, you deserve it</p> diff --git a/files/de/mozilla/localization/lokalisierung_von_pontoon/index.html b/files/de/mozilla/localization/lokalisierung_von_pontoon/index.html new file mode 100644 index 0000000000..edd35eb17e --- /dev/null +++ b/files/de/mozilla/localization/lokalisierung_von_pontoon/index.html @@ -0,0 +1,135 @@ +--- +title: Lokalisierung von Pontoon +slug: Mozilla/Localization/Lokalisierung_von_Pontoon +translation_of: Mozilla/Localization/Localizing_with_Pontoon +--- +<p>Lokalisierung von <a href="https://pontoon.mozilla.org" title="https://pontoon.mozilla.org">Pontoon</a> is a web-based, What-You-See-Is-What-You-Get (WYSIWYG), localization (l10n) tool. At Mozilla, we use Pontoon to localize all Mozilla products and websites, ranging from Firefox to Mozilla.org. Pontoon is a very simple and intuitive tool that requires little to no technical skill to use in the l10n workflow. Here we'll discuss how to use Pontoon to localize projects, from first sign-in to finalizing your contributions. Along the way, we'll point out some sweet features that will make you more efficient and make your l10n contributions easier.</p> + +<div class="note"> +<p><strong>Are you a developer?</strong> Read about <a href="/en-US/docs/Implementing_Pontoon_Mozilla">implementing Pontoon in your project</a> or learn how to get involved on <a href="https://github.com/mozilla/pontoon">GitHub</a>.</p> +</div> + +<h2 id="First_steps">First steps</h2> + +<p><a href="https://pontoon.mozilla.org" title="https://pontoon.mozilla.org">Pontoon's home page</a> is very easy to use. To begin localizing the project, click on the Persona icon and sign in. Next, simply select the project you want to work on and your locale from the dropdown menus. Pontoon will automatically open that locale's project for you to get started. Note that for our purposes here, we'll be using <a href="https://affiliates.mozilla.org/">Firefox Affiliates</a> website to demo Pontoon's functionality and workflow. And there it is, opened inside Pontoon:</p> + +<p><em><img alt="Browser app and workspace" src="https://mdn.mozillademos.org/files/8323/affiliates.png" style="height: 558px;"></em></p> + +<h3 id="Main_toolbar">Main toolbar</h3> + +<p>As you can see, most of the interface is taken by the website being translated. Only the toolbar on top belongs to Pontoon, containing the following items (from left to right):</p> + +<p><img alt="Main toolbar" src="https://mdn.mozillademos.org/files/8325/toolbar.png"></p> + +<h4 id="List_of_strings">List of strings</h4> + +<p>Opens a sidebar with a list of all strings to localize.</p> + +<h4 id="Project_selector_(Affiliates)"><span id="cke_bm_939S" style="display: none;"> </span>Project selector (Affiliates)</h4> + +<p>Switches between projects to localize.</p> + +<h4 id="Resource_selector_(Homepage)"><span id="cke_bm_940S" style="display: none;"> </span>Resource selector (Homepage)</h4> + +<p>Switches between project resources to localize, like subpages or localization files. Hidden if no resources available for project.</p> + +<h4 id="sect1"><span id="cke_bm_941S" style="display: none;"> </span></h4> + +<dl> +</dl> + +<h4 id="Locale_selector_(Slovenian)">Locale selector (Slovenian)</h4> + +<p>Switches between languages to localize.</p> + +<h4 id="Go">Go</h4> + +<p>Opens project-resource-locale selection.</p> + +<h4 id="Progress_indicator">Progress indicator</h4> + +<p>Displays your progress on the resource being localized. More details are available in the popup.</p> + +<dl> +</dl> + +<h4 id="User_menu"><span id="cke_bm_943S" style="display: none;"> </span>User menu</h4> + +<p>Allows for user-specific tasks, like commiting to repository, downloading files and signing out.</p> + +<h4 id="Info_menu">Info menu</h4> + +<p>Gives important information, like the anticipated project timeline and a list of keyboard shortcuts.</p> + +<dl> +</dl> + +<p>Alright, how about we do some translating now?<span id="cke_bm_608E" style="display: none;"> </span></p> + +<dl> +</dl> + +<h2 id="Translate_strings">Translate strings</h2> + +<p>When using Pontoon for localization, you have a couple of options to translate your strings. You can translate in-context, out-of-context, or a combination of the two. We'll start with looking at in-context translation.</p> + +<h3 id="In-context">In-context</h3> + +<p>Pontoon's in-context translation mode is what puts it above others. It opens a web page (or web app) and enables real-time editing of that page. Here's how you translate your first string:</p> + +<p><img alt="In-context localization" src="https://mdn.mozillademos.org/files/8331/in-context.png"></p> + +<ol> + <li>Hover over the text you want to translate with your mouse.</li> + <li>An edit button appears over that text. Click on it to enable the translate mode.</li> + <li>Replace the original text with its translation into your language.</li> + <li>Click the save button to save your translation.</li> +</ol> + +<div> +<h3 id="Out-of-context">Out-of-context</h3> + +<p>Some strings are impossible to translate in-context, e.g. the contents of the <title> tag in websites and strings with placeables or different plural forms. By clicking on the hamburger icon in the main toolbar, a list of all strings and available translations will open in the sidebar. You can also use the sidebar for out-of-context localization:</p> + +<p><img alt="Out-of-context localization: list" src="https://mdn.mozillademos.org/files/8337/out-of-context-1.png"> <img alt="Out-of-context localization: translate" src="https://mdn.mozillademos.org/files/8335/out-of-context-2.png"></p> + +<ol> + <li>Click on the string you'd like to translate.</li> + <li>Translation panel with original string and its details (e.g. comments) opens.</li> + <li>Translate the string in the translation area below.</li> + <li>Click the save button to save your translation.</li> +</ol> + +<p>As you translate strings out-of-context, translations will also appear in website, if they could also be translated in-context.</p> + +<h3 id="Translation_helpers">Translation helpers</h3> +</div> + +<p>As you can see, suggestions from history, translation memory, machine translation and other locales are also available in the out-of-context translation panel. We call all of these translation helpers and here's how each of them will help you as you translate strings:</p> + +<p><img alt="Translation helpers: History" src="https://mdn.mozillademos.org/files/8339/helpers-history.png"> <img alt="Translation helpers: Machinery" src="https://mdn.mozillademos.org/files/8341/helpers-machinery.png"> <img alt="Translation helpers: Other locales" src="https://mdn.mozillademos.org/files/8343/helpers-locales.png"> <img alt="Translation helpers: Search" src="https://mdn.mozillademos.org/files/8345/helpers-menu.png"></p> + +<h4 id="History">History</h4> + +<p>Displays previously suggested translations, including from other users.</p> + +<h4 id="Machinery">Machinery</h4> + +<p>Displays matches from various services: internal translation memory, <a href="http://transvision.mozfr.org/">Mozilla Transvision</a>, <a href="https://amagama-live.translatehouse.org/">open source translation memory</a>, <a href="http://www.microsoft.com/Language/">Microsoft terminology</a> and <a href="http://www.bing.com/translator">machine translation</a>.</p> + +<h4 id="Other_locales">Other locales</h4> + +<p>Displays matching translations from other locales.</p> + +<h4 id="Search">Search</h4> + +<p>Almost like machinery, but takes provided keyword as input parameter instead of the original string.</p> + +<p>By clicking a suggestion, it gets copied into translation area.</p> + +<dl> +</dl> + +<h2 id="Publishing_your_localization">Publishing your localization</h2> + +<p>Suppose you now want to publish your l10n work by committing it to a repo. Pontoon lets you do that too! Actually, it does that for you by automatically syncing with repositories on hourly basis. You can now pat yourself on the back, do a little dance, go to sleep or do something else to celebrate your work!</p> diff --git a/files/de/mozilla/localization/lokalisierung_von_xliff-dateien/index.html b/files/de/mozilla/localization/lokalisierung_von_xliff-dateien/index.html new file mode 100644 index 0000000000..b11efae69b --- /dev/null +++ b/files/de/mozilla/localization/lokalisierung_von_xliff-dateien/index.html @@ -0,0 +1,59 @@ +--- +title: Lokalisierung von XLIFF-Dateien für iOS +slug: Mozilla/Localization/Lokalisierung_von_XLIFF-Dateien +translation_of: Mozilla/Localization/Localizing_XLIFF_files +--- +<p>Firefox für iOS verwendet das XML-basierte Dateiformat XLIFF zur Speicherung und Weitergabe von Lokalisierungsdaten. <a href="https://www.oasis-open.org/committees/xliff/">XLIFF (eXtensible Localisation Interchange File Format)</a> ist ein Lokaliserungsstandard, der von der Normungsorganisation OASIS verwaltet wird. Ziel dieses Standards ist ein XML-basiertes Dateiformat, das ohne das Risiko von Datenverlust oder -beschädigung zum Austausch von Lokaliserungsdaten zwischen verschiedenen Tools verwendet werden kann. Die meisten Übersetzungstools unterstützen den XLIFF-Standard, sodass die Lokalisierung von XLIFF-Dateien für Firefox für iOS einfach mit diesen Tools erfolgen kann. Die direkte Bearbeitung einer XLIFF-Datei ist recht simpel, besonders wenn man sich mit XML auskennt. Dieses Tutorial wird Schritt für Schritt zeigen wie Strings in einer XLIFF-Datei übersetzt werden. </p> + +<h3 id="String-Repository_für_Firefox_auf_iOS">String-Repository für Firefox auf iOS</h3> + +<p>Die Datei firefox-ios.xliff befindet sich im SVN.</p> + +<ol> + <li>Entscheiden Sie, wo auf Ihrem lokalen Computer Sie die Kopie aus dem github-Repository speichern möchten und navigieren Sie im Terminal dorthin.</li> + <li>Geben Sie folgenden Befehl ein: <code>git clone </code>https://github.com/mozilla-l10n/firefoxios-l10n<code>/your-locale-code/</code></li> + <li>Das Projekt firefox-os sollte sich nun zusammen mit der Datei <code>firefox-ios.xliff </code>in dem von Ihnen gewählten Ordner befinden.</li> +</ol> + +<h3 id="Übersetzen_der_XLIFF-Datei">Übersetzen der XLIFF-Datei</h3> + +<ol> + <li>Öffnen Sie die Datei firefox-ios.xliff in einem Texteditor Ihrer Wahl.</li> + <li>Fügen Sie im <code><file></code>-Tag das Attribut <code>target-language</code> mit dem Code Ihrer Locale als Wert hinzu (z. B. <code>target-language="xx-XX"</code>). Beachten Sie, dass es innerhalb eines XLIFF-Dokuments viele <code><file></code>-Tags geben kann. Jedes <code><file></code>-Tag muss das Attribut <code>target-language</code> mit dem Code Ihrer Locale als Wert enthalten (z. B. <code>target-language="xx-XX"</code>).</li> + <li>Strings befinden sich zwischen <code><trans-unit></code>-Tags. Englische Quell-Strings befinden sich zwischen den Child-Tags <code><source></code>. Nachfolgend ein Beispiel einer solchen <code><trans-unit></code>. + <pre><trans-unit id="Add to Bookmarks"> + <source>Add to Bookmarks</source> +</trans-unit></pre> + </li> + <li>Ihre Übersetzung muss sich zwischen den Child-Tags <code><target></code> befinden. Gehen Sie die gesamte XLIFF-Datei durch und fügen Sie unter jedem <code><source></code>-Tag das Tagpaar <code><target></target></code> hinzu. Dies wird Ihnen helfen, die Strings auszumachen, die übersetzt werden müssen. Das Tagpaar <code><source></code> darf nicht gelöscht werden. + <pre><trans-unit id="Add to Bookmarks"> + <source>Add to Bookmarks</source> + <target>YOUR_TRANSLATION_HERE</target> +</trans-unit> +</pre> + </li> + <li>Fügen Sie die Übersetzungen der Strings zwischen den <code><source></code>-Tags zwischen die <code><target></code>-Tags darunter ein. Bitte beachten Sie, dass folgende Zeichenfolgen nicht übersetzt werden dürfen. + <ol> + <li><code>$(SOME_TEXT_HERE)</code> ein Variablenformat,</li> + <li><code>%1$@</code> ist ein weiteres Variablenformat.</li> + <li><note>-Tags beinhalten Hinweise der Entwickler zur Lokalisierung und sollten nicht übersetzt werden. </li> + </ol> + + <pre><trans-unit id="Add to Bookmarks"> + <source>Add to Bookmarks</source> + <target>Agregar a marcadores</target> + <note>No comment provided by engineer.</note> +</trans-unit> +</pre> + </li> + <li>Speichern Sie Ihre Übersetzungen regelmäßig.</li> + <li>Wenn Sie mit Ihrer Übersetzung fertig sind, ist es wichtig sicherzustellen, dass der XML-Code in der XLIFF-Datei valide ist (z. B. keine beschädigten Tagpaare enthält). Öffnen Sie die Datei in Firefoy, um eine Validitätsprüfung auszuführen und verbessern Sie alle Fehler, die gemeldet werden. </li> +</ol> + +<h3 id="Hochladen_der_XLIFF-Datei">Hochladen der XLIFF-Datei</h3> + +<ol> + <li>Laden Sie mit dem folgenden Befehl die übersetzte XLIFF-Datei in das Verzeichnis Ihrer Locale hoch: <code>git commit -m "Commit message here"</code> .</li> + <li>Speichern Sie Ihre Version im github-Repository: <code>git push</code></li> + <li>Legen Sie die Füße hoch, gönnen Sie sich ein Bier (oder eine Limo) und seien Sie stolz darauf etwas Neues, Anderes und Aufregendes gemacht zu haben! </li> +</ol> diff --git a/files/de/mozilla/localization/programmübersetungen_mit_mercurial/index.html b/files/de/mozilla/localization/programmübersetungen_mit_mercurial/index.html new file mode 100644 index 0000000000..f2dd7ac06d --- /dev/null +++ b/files/de/mozilla/localization/programmübersetungen_mit_mercurial/index.html @@ -0,0 +1,284 @@ +--- +title: Programmübersetzungen mit Mercurial +slug: Mozilla/Localization/Programmübersetungen_mit_Mercurial +translation_of: Mozilla/Localization/Application_Translation_with_Mercurial +--- +<h4 id="draft">{{draft}}</h4> + +<h2 id="Herausfinden_wo_Übersetzungen_fehlen">Herausfinden, wo Übersetzungen fehlen</h2> + +<ol> + <li>Herausfinden, für welche Ableger der Mozilla-Familie noch Übersetzungen fehlen. Dazu sollte die Übersetzungsseite des verantwortlichen Sprachteams gelesen werden (dazu <a href="https://l10n.mozilla.org/teams/">hier</a> den richtigen <a href="https://en.wikipedia.org/wiki/Language_code">Sprachcode</a> - z. B. "de" für Deutsch - anklicken). Das Lokalisationstem kennt die Ableger. Der <strong>Standard-Lokalisationsableger</strong> ist <strong>aurora</strong>.</li> + <li>Als nächstes muss überprüft werden, was noch unübersetzt ist, dazu zur <a href="https://l10n.mozilla.org/teams/">Lokalisations-Statusseite</a> gehen und die Seite der Zielsprache aufrufen.</li> + <li>Im Abschnitt "Applications & Sign-offs" befinden sich verschiedene Produkte und deren Ableger, die noch nicht fertig übersetzt sind. + <ul> + <li>gaia-* bezeichnet Ableger von <a href="http://www.mozilla.org/en-US/firefox/os/">Firefox OS</a>, dem Betriebssystem für Mobilgeräte.</li> + <li>Firefox und fx-* beueichnen Ableger vom <a href="http://www.mozilla.org/firefox">Desktop-Firefox</a>, dem Browser für PCs und Laptops auf Windows, Mac OS oder Linux.</li> + <li>Fennec und fennec-* bezeichnen Ableger vom <a href="http://www.mozilla.org/en-US/firefox/fx/">mobilen Firefox</a>, dem Firefoxbrowser für Android.</li> + <li>Thunderbird und tb-* bezeichen Ableger von <a href="http://www.mozilla.org/thunderbird">Thunderbird</a>, dem E-Mail-Programm, Newsgroup- und Feedreader und Chatprogramm. Die Lokalisation des <a href="https://www.mozilla.org/en-US/projects/calendar/">Lightning Kalendar Add-Ons </a>findet auch hier statt.</li> + <li>SeaMonkey und sea-* bezeichnen Ableger von <a href="http://www.seamonkey-project.org/">SeaMonkey</a>, der All-in-One Internetsuite, die Browser, E-Mail- und Chatprogramm und mehr enthält.</li> + <li>Lightning und cal-* bezeichnen Ableger von Lightning, dem Kalender Add-On für Thunderbird. Die Lokalisation von Lightning findet inzwischen in Thunderbirds tb-*-Teil statt, der cal-*-Bereich wird nicht länger verwendet.</li> + </ul> + </li> + <li>In diesem Beispiel soll der Aurora-Ableger des Desktop-Firefox übersetzt werden. Deshalb zu<strong> fx_aurora</strong> scrollen.</li> + <li>Der Text daneben zeigt den Übersetzungsstatus an. + <ul> + <li>Wenn dort '<strong>Translated</strong>' steht, ist der Ableger schon fertig übersetzt. Nun können Sie entweder ein anderes Produkt übersetzen oder jemanden von der Lokalisationsseite (siehe oben) kontaktieren, damit er Sie informieren kann, wenn neue unübersetzte Texte vorhanden sind.</li> + <li>Wenn es ein roter Text ist, der aus einer <strong>Nummer</strong> und dem Wort '<strong>missing</strong>' besteht, sind unübersetzte Texte vorhanden und die Anleitung kann weiter ausgeführt werden.<br> + </li> + </ul> + </li> +</ol> + +<h2 id="Required_Tools">Required Tools</h2> + +<h4 id="Build_pre-requisites">Build pre-requisites</h4> + +<p>First, get the required programs to compile Mozilla applications like Firefox and Thunderbird from <a href="/en-US/docs/Developer_Guide/Build_Instructions">Build Instructions</a>. This is only necessary once.</p> + +<div class="note"> +<p>Install MozillaBuild 1.9.0pre from <a href="https://groups.google.com/forum/#!topic/mozilla.dev.platform/aIFUKRrb3IY">https://groups.google.com/forum/#!topic/mozilla.dev.platform/aIFUKRrb3IY</a></p> +</div> + +<div class="warning"> +<p>MozillaBuild must be installed into an absolute file path without whitespaces, else it will break.</p> +</div> + +<h4 id="File_comparison_program">File comparison program</h4> + +<p>For the translation, it is recommend to use file comparison program to compare the English file (containing the new texts) with the file of your locale (which is still missing the new strings). This example uses <a href="http://winmerge.org/">WinMerge</a>: Download and install it. A comparison of alternatives (e.g. for Linux and Mac OS) is available on <a href="https://en.wikipedia.org/wiki/Comparison_of_file_comparison_tools">Wikipedia</a>.</p> + +<h4 id="File_and_text_editor">File and text editor</h4> + +<p>For editing individual files a text editor can be a better choice than a file comparion program, e.g. because the file is new and everything has to be translated, the file is too customized to compare it to the English one, or special functionality is required (e.g. bookmarking untranslated lines). Use a text editor you are comfortable with. This example uses <a href="http://notepad-plus-plus.org/">Notepad++</a>.</p> + +<h4 id="Progress_tracking_tool">Progress tracking tool</h4> + +<p>To track which strings and files already have been translated and later also to see which new strings have already been tested in the product as being a good translation for the functionality behind the translated strings and that the translated texts fit into the available, the translation progress should be tracked. This can be done in a text editor or word processor or any other tool in which you can attach different kind of states to the individual texts to translate. The Firefox extension <a href="https://addons.mozilla.org/firefox/addon/scrapbook/">Scrapbook</a> is used in this guide. Install it into your default Firefox profile (you will have more than one profile when following this guide).</p> + +<h2 id="Getting_the_current_Texts_in_English_and_your_Locale">Getting the current Texts in English and your Locale</h2> + +<h4 id="Obtaining_the_English_texts_with_the_source_code">Obtaining the English texts with the source code</h4> + +<p>Get the source code by downloading the following file:</p> + +<ul> + <li><strong>Firefox Desktop</strong> or <strong>Firefox for Android</strong>: Download the <strong>mozilla-<branch>.hg</strong> file (e.g. mozilla-aurora.hg) from <a href="https://ftp.mozilla.org/pub/mozilla.org/firefox/bundles/">https://ftp.mozilla.org/pub/mozilla.org/firefox/bundles/</a> The file is not small, but after initially downloading it, you only need to download the latest changes in the future.</li> + <li><strong>Thunderbird</strong>, <strong>Lightning</strong> or <strong>SeaMonkey</strong>: Download the <strong>comm-<branch>.hg</strong> file (e.g. comm-aurora.hg) from <a href="http://ftp.mozilla.org/pub/mozilla.org/thunderbird/bundles/">https://ftp.mozilla.org/pub/mozilla.org/thunderbird/bundles/</a></li> +</ul> + +<p>In the next step, we will unpack the source code:</p> + +<ol> + <li>Open an input shell, e.g. by pressing the Windows key and R on the keyboard <img alt="Screenshot of Windows key + R key" src="https://mdn.mozillademos.org/files/7211/windows%20key%20plus%20r.png" style="width: 82px; height: 30px;"> or by calling the "<code>Run...</code>" command from the Windows "Start" button, and then typing <code><strong>cmd</strong></code> and pressing the Enter key.</li> + <li>Launch the installed MozillaBuild toolset by launching it with its path, e.g. <code>C:\Mozilla\Coding\Buildtools\MozillaBuild\start-shell-msvc2010.bat</code> You can autocomplete the file path after typing a few characters and then pressing the Tabulator key.<br> + If you launch the start-shell-l10n.bat, compiling features will be disabled. You can create translation patches, but creating language packs for the application, binary repacks of the application (changing the localization of the program), and compiling the application likely won't work.</li> + <li>You are now in the Mozilla development environment which emulates a Linux environment. Now go to the directory where you want to put the source code. It's highly recommended to put it onto the fastest hard drive in the device. File paths here work starting with a slash (/) followed by the drive letter, and then the directory structure like on Windows, but using slashes (/) instead of backslashes (\). So let's go to C:\Mozilla by typing<br> + <code>cd /c/Mozilla/</code></li> + <li>Create a new directory for the source code:<br> + <code>mkdir mozilla-aurora</code></li> + <li>Initialize the new directory as new repository:<br> + <code>hg init mozilla-aurora</code></li> + <li>Go into the new directory:<br> + <code>cd mozilla-aurora</code></li> + <li>Unpack the source code:<br> + <code>hg unbundle /path/to/the/downloaded/mozilla-aurora.hg</code><br> + This can take some time, mostly depending on the performance of the hard drive.</li> +</ol> + +<h4 id="Obtaining_the_texts_of_your_localization">Obtaining the texts of your localization</h4> + +<ol> + <li>Go back to the parent folder of <code>mozilla-aurora</code>:<br> + <code>cd ..</code></li> + <li>Find the localization repository for your branch and language on <a href="http://hg.mozilla.org/">http://hg.mozilla.org/</a> E.g. for aurora and German (language code 'de'), it is <code>http://hg.mozilla.org/releases/l10n/mozilla-aurora/de/</code> Copy that url to the clipboard.</li> + <li>Copy the repository to your computer by running the following command:<br> + <code>hg clone http://hg.mozilla.org/releases/l10n/mozilla-aurora/de/ de-mozilla-aurora</code><br> + This should proceed pretty fast.<br> + On Windows, you can paste the url by calling the Paste command from the window menu in the upper left corner of the window.</li> +</ol> + +<h2 id="Configuring_your_Mercurial_user_settings">Configuring your Mercurial user settings</h2> + +<p>Still in the command prompt, go to your home directory in the file system, e.g. for a Windows user, it looks like C:\Users\MyName , depending on your Windows version:</p> + +<p><code>cd /c/Users/MyName</code></p> + +<p>Now list all the files here:</p> + +<p><code>ls -l</code></p> + +<p>If there is no file called <code>.hgrc</code> , create it with</p> + +<p><code>> .hgrc</code></p> + +<p>This file stores your general Mercurial settings (Mercurial is the tool which manages the source code and its history of changes).</p> + +<p>Now go in the file system to the file and open it in your favorite text editor. Windows users can use e.g. <a href="http://notepad-plus-plus.org/">Notepad++</a>.</p> + +<p>Paste the following content into the file:</p> + +<pre>[ui] +username = Firstname Lastname <mynick@example.com> +merge = internal:merge + +[alias] +qexport = export -g -r qtip +qexportall = diff -r qparent + +[defaults] +commit = -v +diff = -p -U 8 +qdiff = -p -U 8 +qnew = -U + +[diff] +git = 1 +showfunc = 1 +unified = 8 + +[extensions] +hgext.mq = +progress = + +[hooks] + +</pre> + +<p>Put in your name and email address which later will be public on the internet after your translation patch got accepted and uploaded. Save the file and close it.</p> + +<h2 id="Enabling_Mercurial_queues_(revertable_patches)">Enabling Mercurial queues (revertable patches)</h2> + +<p>Some time will pass between the moment in which you start the localization, finish it, test it, improve it, upload it for review and get review (maybe not approved on first try). Other localizers will likely have done changes to the translation, either adding new texts, removing obsolete ones or improving the current texts. This can cause conflicts between the changes you created and theirs. For this reason, updating patches kann be necessary so Mercurial is still able to find the lines in the files which it has to replace or where it has to add them. <a href="/en-US/docs/Mercurial_Queues">Mercurial queues</a> allow to revert changes and also pull changes and reapply your local changes.</p> + +<p>Go back to the localization directory:</p> + +<p><code>cd /c/Mozilla/de-mozilla-aurora</code></p> + +<p>Initiate Mercurial queues:</p> + +<p><code>hg qinit</code></p> + +<h2 id="Get_to_know_the_translation_style">Get to know the translation style</h2> + +<p>For having good chances that the translation suggestions get accepted, they should match the translation style of the texts in the application already translated. In general, the labels in the applications should have the same style like the operating system, e.g. use the same order of subject, verb and objects; decline verbs or not like the operating system does.</p> + +<p>The following resources can help figuring out the translation style and translate according to them:</p> + +<ul> + <li><a href="https://l10n.mozilla.org/teams/">Check your localization team's page</a> by clicking on the team with your <a href="https://en.wikipedia.org/wiki/Language_code">language code</a> (e.g. "de" for German) for a style guide (e.g. <a href="https://wiki.mozilla.org/L10n:Teams:de/Leitfaden_%C3%9Cbersetzung">style guide</a> for German).</li> + <li><a href="http://transvision.mozfr.org/">Transvision</a> offers searching for texts and text ids ("entities" or "keys"), allowing to quickly find translations for already translated texts.</li> + <li><a href="http://www.microsoft.com/language/de-de/default.aspx">Microsoft's terminology search</a> allows fast lookups of localized technical terms.</li> +</ul> + +<h2 id="Choosing_what_to_translate">Choosing what to translate</h2> + +<p>Go to the <a href="https://l10n.mozilla.org/teams/">Localization status page</a> and click on the '<number> missing' label of the Firefox branch on which you want to translate, e.g. <strong>fx_aurora</strong>. The page which opens has a bar holding information about how many texts (strings) have already been translated, how many there are in English and your locale and have the same text, and how many are missing in your local. The interesting part follows below as list of missing texts.</p> + +<p><img alt="unchanged localization report" src="https://mdn.mozillademos.org/files/7303/mozilla%20-%20localization%20report%20-%20new.png" style="width: 483px; height: 396px;"></p> + +<p>The first line shows the locale for which the texts are bing translated (in this example: de - German). With the second line start the file paths of the files which require changes. The file paths follow the directory structure of the locale repository downloaded for translation. In this example, the file aboutDialog can be found in the folder browser/chrome/browser/. The text striked through are texts which have been removed in the English version and can also be removed from the locale being worked on. In this example we will translate the one new text with the id <strong>privatebrowsingpage.howToStart4</strong> in the file <strong>aboutPrivateBrowsing.dtd</strong>.</p> + +<p>Tips for finding files with usually easily translateable texts:</p> + +<ul> + <li>Look for files in browser/chrome/browser/</li> + <li>Look for a file with only a few changes</li> + <li>Suggestions + <ul> + <li>Files starting with <strong>about</strong>...</li> + <li>Files in the <strong>preferences</strong> directory (browser/chrome/browser/preferences/)</li> + <li>The <strong>browser.dtd</strong> and <strong>browser.properties</strong> files if there aren't too many new strings.</li> + </ul> + </li> +</ul> + +<h2 id="Tracking_the_translation_progress">Tracking the translation progress</h2> + +<p>If you translate more than a few strings, you usually want to keep track of what has already been translated (and later if the text has been tested in the product as fitting into the available area and suiting the functionality it describes). This guide achieves this with the Firefox extension <a href="https://addons.mozilla.org/firefox/addon/scrapbook/">Scrapbook</a>.</p> + +<ol> + <li>You installed Scrapbook earlier, now open it in Firefox either by calling it from the Firefox menu bar (press the Alt key to show it if necessary) using "View" > "Sidebar" > "Scrapbook" or by clicking its toolbar button which you likely have to add by toolbar customization if you didn't do this before.</li> + <li>Drag the tab with the localization error showing missing and obsolete strings to the sidebar.</li> + <li>After Scrapbook has saved the web page to your local disk, click with the right mouse button on the page in the sidebar and choose "Properties" from the context menu which gets opened. Rename it something meaningful, e.g. "Firefox <version number> translation".</li> + <li>After you saved the dialog, click with the left mouse button on the page in the sidebar to open the locally saved copy.</li> +</ol> + +<h2 id="Opening_English_files_and_the_target_locale_side-by-side">Opening English files and the target locale side-by-side</h2> + +<p>The localization report shows the IDs of added or removed texts, but the English text itself is still unknown. We get this by comparing the English version of the file with the one of the locale we are translating in. To do so,</p> + +<ol> + <li>Launch WinMerge.</li> + <li>From its "File" menu, choose "Save project".</li> + <li>For the file path of the left directory, go to the downloaded <code>mozilla-aurora</code> source code and then into its <strong><code>browser/locales/en-US/</code></strong> folder. In this example, the absolute file path is <code>C:\Mozilla\mozilla-aurora\browser\locales\en-US</code>.</li> + <li>Enable read-only mode for the left directory.</li> + <li>For the file path of the right directory, go to the downloaded translation directory <code>de-mozilla-aurora</code> and then into its <code>browser</code> folder. In this example, the absolute file path is <code>C:\Mozilla\de-mozilla-aurora\browser</code>.</li> + <li>Save this comparison as project so you can easily relaunch this comparision without selecting the directories again. A good name is e.g. <code>translation-mozilla-aurora-browser.winmerge</code></li> + <li>Open the comparison you just saved.</li> +</ol> + +<h2 id="The_translation">The translation</h2> + +<ol> + <li> + <p>Bring the console with Mercurial to the front.</p> + </li> + <li> + <p class="brush: bash">Start tracking changes you make against the localization repository by telling it that with the <strong><code>qnew</code></strong> subcommand to save these changes as patch in a mercurial queue. This patch needs a name, choose something meaning full like "<code>Firefox-<version number>-more-details</code>". In this example, <code>Firefox-29-aboutPrivateBrowsing</code> will be used.<br> + <code>hg qnew Firefox-29-aboutPrivateBrowsing</code></p> + </li> + <li>Switch back to WinMerge and navigate to <code>browser/chrome/browser/</code> and open the <code>aboutPrivateBrowsing.dtd</code> file. You will see something like this:<br> + <img alt="single file comparision in WinMerge without changes by the user" src="https://mdn.mozillademos.org/files/7305/mozilla%20-%20compare%20-%20unchanged.png"><br> + On the left, you see an overview of the comparison of the English and the non-English file. Gray parts indicate blocks of texts which can't be found in that file, dark yellow represents changed lines and light yellow the parts of text in it which is different.</li> + <li>Below the license header which should never changed, the texts are organized in the following format:<br> + <code><!ENTITY stringid "Text which will be shown in Firefox"></code></li> + <li>As you can see there is a bigger block of text not recognized. This is due to the texts which have in the English versionmoved from below the string with the id <code>privatebrowsingpage.howToStart3</code> to a position above it. Cut and paste these strings in the localized file so their position corresponds to the on in the English file.</li> + <li>Press the F5 key or click the reload button in WinMerge's toolbar to re-compare the files.</li> + <li>Now copy the empty lines below <code>privatebrowsingpage.learnMore</code> and the line <code><!-- TO BE REMOVED POST-AUSTRALIS --></code> to the localized file. This text is a comment (which in .dtd files always can be found between <code><!--</code> and <code>--></code>). There is no need to translate this text.</li> + <li>Now we copy the two missing lines from the English file and insert them in the localized file:<br> + <code><!-- LOCALIZATION NOTE (privatebrowsingpage.howToStart4): please leave &newPrivateWindow.label; intact in the translation --><br> + <!ENTITY privatebrowsingpage.howToStart4 "To start Private Browsing, you can also select &newPrivateWindow.label; from the menu."></code><br> + The first line is a comment providing information on the localization of the text in the following line. <code>&newPrivateWindow.label;</code> has to be left unchanged so it can be replaced with the text of the string id <code>&newPrivateWindow.label;</code> whis is stored elsewhere<code>.</code></li> + <li><strong>Translation time</strong>: Translate the text. Afterwars, the line should look somehow like this:<br> + <code><!ENTITY privatebrowsingpage.howToStart4 "Der private Modus kann auch über den Menü-Eintrag &newPrivateWindow.label; gestartet werden."></code></li> + <li>Save the file.</li> +</ol> + +<h2 id="Exporting_the_changes_as_patch">Exporting the changes as patch</h2> + +<p>A patch is a file containing recorded changes to a repository. It can be used to apply these changes to a copy of the repository yet without these changes.</p> + +<ol> + <li>Tell Mercurial to store the changes in the Mercurial queue with the <code>qref</code> command. We also create a commit message which will describe the changes in the patch and later get used when the patched gets checked in ('added') to the official repository with the localized files. For the commit message, we have to use the <code>-m</code> command line flag,<br> + <code>hg qref -m "Firefox 29: Localize missing string in aboutPrivateBrowsing.dtd"</code><br> + You can change the commit message in the Mercurial queue every time by calling <code>hg qref</code> again.</li> + <li>Now export the patch to the file system using the <code>qexport</code> command which is defined in the <code>.hgrc</code> file (see above):<br> + <code>hg qexport > ../firefox-29-aboutPrivateBrowsing-v1.patch</code><br> + This creates a patch file called <code>firefox-29-aboutPrivateBrowsing-v1.patch</code> containing the changes in the parent directory of <code>de-mozilla-aurora</code> (in this example: <code>C:\Mozilla\</code>).</li> +</ol> + +<h2 id="Proof-reading_and_altering_the_patch">Proof-reading and altering the patch</h2> + +<p>Now proof-read the patch. This detects often more than 90 percent of the possible reasons for the reviewer to not accept the patch. If you find that changes have to be done, edit the real aboutPrivateBrowsing.dtd file from the localization repository, save it and follow the steps from Exporting the changes as patch (see above).</p> + +<h2 id="Validating_the_translation_in_the_product">Validating the translation in the product</h2> + +<p>This guide hasn't yet a section about the validation of the translation. Please follow the instructions from the <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Quick_start_guide/QA_phase">QA phase section of the Localization quick start guide</a>.</p> + +<h2 id="Submitting_the_patch_for_review">Submitting the patch for review</h2> + +<p>Now the patch has to be shared so the people currently trusted to change the official translation can review the suggested changes.</p> + +<ol> + <li>File a <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Mozilla%20Localizations">bug ("ticket") in the Mozilla Localization product</a> and choose as component the localization for which you have translated.</li> + <li>Choose a meaningful bug summary which will be shown for searches etc. like in this example "Firefox 29: aboutPrivateBrowsing.dtd"</li> + <li>Fill any important and additional information into the description field.</li> + <li>Click the 'Add attachment' button.</li> + <li>Select the exported patch file with the file picker. The checkbox for 'patch' should get automatically checked.</li> + <li>Add a meaningful name for the attachment, e.g. aboutPrivateBrowsing.dtd, patch, v1</li> + <li>Go to the review 'Flags' category and set the one for <strong>review</strong> to <strong>?</strong>, meaning that you request review for the patch.</li> + <li>In the text field next to it, add the mail address of the person leading the translation of the locale. This information can be found on the <a href="https://l10n.mozilla.org/teams/">page of the localization team</a>.</li> + <li>Submit the bug report.</li> + <li>Now you have to wait for the review of that person. This can happen on the same day, on the next weekend or later, but should happen in the timeframe given for the localization of aurora. If the person requests changes, follow the instructions under <strong>Proof-reading and altering the patch</strong>. If the reviewer accepts the changes, the patch will get uploaded and your translation will officially be added to Firefox.</li> +</ol> |