diff options
Diffstat (limited to 'files/ar/mozilla/localization')
5 files changed, 0 insertions, 680 deletions
diff --git a/files/ar/mozilla/localization/index.html b/files/ar/mozilla/localization/index.html deleted file mode 100644 index 18af36251d..0000000000 --- a/files/ar/mozilla/localization/index.html +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: Localization at Mozilla -slug: Mozilla/Localization -tags: - - Landing - - Localization - - Mozilla - - NeedsTranslation - - TopicStub - - Translation - - l10n -translation_of: Mozilla/Localization ---- -<p><span class="seoSummary"><strong>Localization</strong> (L10n) is the process of translating software user interfaces from one language to another and adapting it to suit a foreign culture. These resources are for anyone with an interest in the technical aspects involved in localization.</span> They are for developers and all contributors.</p> - -<div class="warning"> -<p>The documentation here is no longer being maintained and is inaccurate. L10n documentation has moved to <a href="https://mozilla-l10n.github.io/localizer-documentation/">https://mozilla-l10n.github.io/localizer-documentation/</a> . To learn how to bootstrap a new locale for Mozilla projects, please see those documents</p> -</div> - -<h2 id="See_also">See also</h2> - -<dl> - <dt><a href="/en-US/docs/Project:MDN/Localizing" title="/en-US/docs/Project:MDN/Localizing">Localizing MDN</a></dt> - <dd>This resource covers localization of the documentation here on MDN.</dd> - <dt><a href="/en-US/Apps/Build/Localization">App localization</a></dt> - <dd>This set of documents applies more specifically to localizing apps, including Firefox OS apps.</dd> - <dt><a href="/en-US/docs/Web/API/L10n">L10n</a></dt> - <dd>Reference docs for the L10n API that Mozilla uses to localise Firefox OS.</dd> -</dl> diff --git a/files/ar/mozilla/localization/localizing_xliff_files/index.html b/files/ar/mozilla/localization/localizing_xliff_files/index.html deleted file mode 100644 index ec8609c60d..0000000000 --- a/files/ar/mozilla/localization/localizing_xliff_files/index.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: Localizing XLIFF files for iOS -slug: Mozilla/Localization/Localizing_XLIFF_files -translation_of: Mozilla/Localization/Localizing_XLIFF_files ---- -<p>Firefox for iOS uses the XLIFF XML-based file format to hold and transfer localization data. <a href="https://www.oasis-open.org/committees/xliff/">XLIFF (eXtensible Localisation Interchange File Format)</a> is a localization standard governed by the OASIS standards body. The goal of the standard is to have an XML-based format to use when exchanging localization data between tools without the potential of data loss or corruption. Most translation tools support the XLIFF standard, making localizing the XLIFF files for Firefox for iOS easy to do using translation tools. Editing the raw XLIFF file is also rather easy, especially if you're already familiar with XML. This tutorial will walk you through the steps you need to take to translation strings within an XLIFF file.</p> - -<h3 id="String_repository_for_Firefox_on_iOS">String repository for Firefox on iOS</h3> - -<p>The firefox-ios.xliff file is located in SVN.</p> - -<ol> - <li>Decide where on your local computer you will store your copy of the github repo and navigate there in your terminal.</li> - <li>Enter the command <code>git clone </code>https://github.com/mozilla-l10n/firefoxios-l10n<code>/your-locale-code/</code></li> - <li>You should now see the firefox-ios project in your selected directoy with the <code>firefox-ios.xliff</code> file in it.</li> -</ol> - -<h3 id="Translating_the_XLIFF_file">Translating the XLIFF file</h3> - -<ol> - <li>Open the firefox-ios.xliff file in your favorite text editor.</li> - <li>In the <code><file></code> tag, add the <code>target-language</code> attribute with your locale code as the value (e.g., <code>target-language="xx-XX"</code>). Be aware that there may be many <code><file></code> tags within one XLIFF document. Each <code><file></code> tag requires the <code>target-language</code> attribute with your locale code as the value (e.g., <code>target-language="xx-XX"</code>).</li> - <li>Strings are located within <code><trans-unit></code> tags. Source English strings are contained in <code><source></code> child tags. Here is an example of such a <code><trans-unit></code> - <pre><trans-unit id="Add to Bookmarks"> - <source>Add to Bookmarks</source> -</trans-unit> -</pre> - Your translations must be contained inside <code><target></code> child tags. Go through the full xliff page adding <code><target></target></code> below each <code><source></code> tag set to help you to identify strings that need to be translated. Do not delete the <code><source></code> tag sets. - - <pre><trans-unit id="Add to Bookmarks"> - <source>Add to Bookmarks</source> - <target>YOUR_TRANSLATION_HERE</target> -</trans-unit> -</pre> - </li> - <li>Provide translations of the strings in the <code><source></code> tag sets by placing their translations in the <code><target></code> tag sets beneath them. Keep in mind the following sets of characters that need to remain untranslated: - <ol> - <li><code>$(SOME_TEXT_HERE)</code> is a variable format,</li> - <li><code>%1$@</code> is another variable format.</li> - <li><note> tags contain localizer notes from developers and should not be translated.</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>Save your translations along the way.</li> - <li>Once you've completed translation, it's important to make sure the XML in your XLIFF file is valid (e.g., no broken tag sets). Open the file in Firefox to have it run a validity check and correct any errors it might yell about.</li> -</ol> - -<h3 id="Commiting_your_XLIFF_file">Commiting your XLIFF file</h3> - -<ol> - <li>Using this command, commit your translated XLIFF file into your locale's directory: <code>git commit -m "Commit message here"</code> .</li> - <li>Push your commit into the github repo: <code>git push</code></li> - <li>Kick up your feet, pop open a cold beer (or soda), and pat yourself on the back for doing something new, different, and exciting!</li> -</ol> diff --git a/files/ar/mozilla/localization/web_localizability/creating_localizable_web_applications/index.html b/files/ar/mozilla/localization/web_localizability/creating_localizable_web_applications/index.html deleted file mode 100644 index 1971da3911..0000000000 --- a/files/ar/mozilla/localization/web_localizability/creating_localizable_web_applications/index.html +++ /dev/null @@ -1,437 +0,0 @@ ---- -title: Creating localizable web applications -slug: Mozilla/Localization/Web_Localizability/Creating_localizable_web_applications -translation_of: Mozilla/Localization/Web_Localizability/Creating_localizable_web_applications ---- -<p>An important step of developing a web application or creating web content is making sure that it can be localized. Listed below are good practices and recommendations that should be followed in order to make your content easily localizable.</p> -<p><span style="font-size: x-small;"><em>Most of the code snippets used in the examples below come from an early version of the getpersonas.com website. In some cases, the code snippets were slightly changed to better illustrate the recommendations or for clarity.</em></span></p> -<h2 id="Cheatsheet">Cheatsheet</h2> -<ul> - <li><strong>Don't hardcode</strong> English text, formats (numbers, dates, addresses, etc.), word order or sentence structure.</li> - <li><strong>Don't put text or numbers in images</strong>.</li> - <li>Don't forget about <strong>right-to-left</strong> locales.</li> - <li>Take advantage of <code>printf()</code> (or equivalents) and <strong>use variables in the English strings</strong>.</li> - <li><strong>Write semantic code</strong> (e.g. don't use text and <code><img/></code> for decorations; instead, use CSS).</li> - <li><strong>Document your code</strong> so that localizers know what they're translating (e.g. in gettext <strong>use comments and contexts</strong>).</li> -</ul> -<h2 id="App_Logic">App Logic</h2> -<h3 id="Detect_the_locale_correctly">Detect the locale correctly</h3> -<p>Be smart about detecting the user's locale correctly. You can use one or more of the following techniques:</p> -<ul> - <li>HTTP <em>Accept</em>-<em>Language</em> headers,</li> - <li>the UA string,</li> - <li>IP geolocation.</li> -</ul> -<p>See examples of the addons.mozillaorg code at <a class="external" href="http://viewvc.svn.mozilla.org/vc/addons/trunk/site/app/config/language.php?view=markup" title="http://viewvc.svn.mozilla.org/vc/addons/trunk/site/app/config/language.php?view=markup">/addons/trunk/site/app/config/language.php</a> and <a class="external" href="http://viewvc.svn.mozilla.org/vc/addons/trunk/site/app/config/language.inc.php?view=markup" title="http://viewvc.svn.mozilla.org/vc/addons/trunk/site/app/config/language.inc.php?view=markup">/addons/trunk/site/app/config/language.inc.php</a>. The <code>LANGUAGE_CONFIG</code> class expects arrays of valid languages & supported languages.</p> -<p>Always give the user a possibility to change the locale (e.g. by adding locale dropdown menu at bottom of page) and remember this choice for the future visits.</p> -<h3 id="Use_the_locale_code_in_the_URLs">Use the locale code in the URLs</h3> -<p>Depending on how you detect user's locale, you may want to provide a way of overriding the autodetection. You can achieve this by setting a cookie when the changes the locale with the language dropdown, or by looking for locale code in the URL. The latter involves rewriting the URLs to include the locale code and rewriting Apache's aliases to handle locale in URLs.</p> -<p>You can put the locale code as the top-most element of the URL's path (e.g. <code><a class="external" href="http://example.com/en-US/foo/bar" rel="freelink">http://example.com/en-US/foo/bar</a></code>) or on its end (e.g. <code><a class="external" href="http://example.com/foo/bar/en-US" rel="freelink">http://example.com/foo/bar/en-US</a></code>). Avoid using it in a subdomain, as it can cause problems with certificates (this is wrong: <strike><code><a class="external" href="http://en-us.example.com/foo/bar" rel="freelink">http://en-us.example.com/foo/bar</a></code></strike>).</p> -<h3 id="Simplify_localized_versions_if_necessary">Simplify localized versions if necessary</h3> -<p>Oftentimes, it is better to slightly simplify the localized version of your web application than to serve a mix of localized and English content. For example, if not all the pages of your website are going to be localized, you may consider removing links to the English-only pages from the navigation (headers, footers, sidebars) in the localized versions.</p> -<h3 id="Define_the_locale_and_the_direction_in_the_HTML">Define the locale and the direction in the HTML</h3> -<p>Generate the lang attribute dynamically, depending on the current locale. Use the <code>dir</code> attribute on the <code><html/></code> element and consider using a <code>rtl</code> class on <code><html/> </code>or <code><body/></code> as well, in order to easily change CSS rules like in the example below.</p> -<p><strong>Snippet 1. Bad:</strong></p> -<pre class="brush: html"><html lang="en"> -</pre> -<p><strong>Snippet 2. Good:</strong></p> -<p>CSS:</p> -<pre class="brush: css"><code>html[dir='rtl'] foo { - /* RTL-specific rules for the FOO element */ -}</code> - -<code>body.rtl foo { - /* RTL-specific rules for the FOO element */ -}</code></pre> -<p>HTML/PHP:</p> -<pre class="brush: php"><?php - function isRTL($locale) { - $RTL_locales = array('ar', 'fa', 'he'); - return in_array($locale, $RTL_locales); - } -?> -<html lang="<?= $locale?>" dir="<?= isRTL($locale) ? 'rtl' : 'ltr' ?>" > - <body class="<?= $locale?> <?= isRTL($locale) ? 'rtl' : 'ltr' ?>"> - </body> -</html></pre> -<p>Notice that <code><body/></code> is given a class equal to the current locale. This is useful to add minor corrective rules to the CSS that apply only for selected locales. For example, for locales that tend to have longer words than English, you may want to make an element slightly wider.</p> -<p><strong>Snippet 3. Good:</strong></p> -<pre class="brush: css"><code>body.de foo, body.fr foo, body.pl foo { - /* locale-specific rules for the FOO element */ - width: 10em; /* originally 8em */ -}</code></pre> -<h3 id="Adapt_the_interaction_to_RTL_locales">Adapt the interaction to RTL locales</h3> -<p>Right-to-left locales not only require good images handling (see <a name="Images">Images</a>), but also should be taken into account when designing the interaction on the website. Consider the following example: a filmreel-like slideshow showcasing highlighted features of the product or featured designs. For right-to-left languages, the slideshow should go from right to left as well, making the last element in the HTML the first one to be displayed.</p> -<h3 id="Separate_URLs_from_navigation">Separate URLs from navigation</h3> -<p>Sometimes, when the URLs are well-designed, you may want to use the URL to do something in the code depending on when the user is. Take the URL structure of the getpersonas.com website for example. The URL <code><a class="external" href="http://getpersonas.com/nature/popular/2" rel="freelink">http://getpersonas.com/nature/popular/2</a></code> points to the second page of the listing of the popular Personas in the "Nature" category. You could easily use <code>list($category, $tab, $page) = explode('/', $path);</code> to get this information directly from the URL. After that, it is tempting to use the $category or $tab variables in the interface. However, this is problematic for localization. You probably don't want to localize the URLs to keep them uniform across locales as well as to avoid issues with non-Latin and/or RTL characters. So in order to display a localized label of a category or a tab, you should create a mapping between the non-localizable English names used in the URLs and the localizable English strings used in the interface. Consider the following example:</p> -<p><strong>Snippet 1. Good:</strong></p> -<pre class="brush: php">$tab_labels = array( "popular" => _('Popular'), - "recent" => _('Recent'), - "all" => _('All'), - "my" => _('My'), - "favorites" => _('Favorites') - ); -list($category, $tab, $page) = explode('/', $path); -if ($tab == 'popular') { // $tab is always English - // .... - echo $tab_labels($tab); // this will display the translation -}</pre> -<h3 id="Indicate_the_language_of_the_pages_you_link_to">Indicate the language of the pages you link to</h3> -<p>Indicate the language of the pages you link to if it is different from the user's current language. For English, add<code> hreflang="en"</code> to links to resources that are not going to be localized or are external to your web application. Then, use CSS to give a cue to the user that if she follows the link, she will be served English content.</p> -<p><strong>Snippet 1. Bad:</strong></p> -<pre class="brush: php"><a href="http://www.mozilla.com/en-US/privacy-policy.html"><?= _('Privacy policy'); ?></a> -</pre> -<p><strong>Snippet 2. Good:</strong></p> -<p>CSS:</p> -<pre class="brush: css">a[hreflang="en"]::after { - content: " [en]" -} -</pre> -<p>HTML/PHP:</p> -<pre class="brush: php"><a href="http://www.mozilla.com/en-US/privacy-policy.html" hreflang="en"><?= _('Privacy policy'); ?></a></pre> -<p> </p> -<h3 id="Don't_mingle_app_logic_and_localizable_content_when_using_pure_HTML">Don't mingle app logic and localizable content when using pure HTML</h3> -<p>If you decide not to use gettext on some pages (e.g. because they contain a lot of text and localizing source HTML is easier), make sure to keep the code responsible for application logic separate from the localizable content. The logic of the website should not be exposed directly in the localization files, to avoid any accidental changes by localizers.</p> -<p><strong>Snippet 1. Bad:</strong></p> -<pre class="brush: php">require_once('lib/user.php'); -$user = new PersonaUser();</pre> -<p><strong>Snippet 2. Good:</strong></p> -<pre class="brush: php">require_once('templates/footer.php');</pre> -<p>If it's not possible to remove the app logic code, you should consider using gettext. Gettext extracts localizable content form the source files, thus making it impossible for localizers to accidentally change them. You can learn more about the choice of the format for your project at <a class="link-https" href="https://wiki.mozilla.org/L10n:Requirements/Web_l10n_filetypes" title="https://wiki.mozilla.org/L10n:Requirements/Web_l10n_filetypes">File formats</a>.</p> -<h2 id="Text_messages">Text messages</h2> -<h3 id="Don't_hardcode_English_content">Don't hardcode English content</h3> -<p>Allow localizers to localize English content, such as:</p> -<ul> - <li>text messages,</li> - <li>number formats,</li> - <li>date formats,</li> - <li>word order and sentence structure.</li> -</ul> -<p>Note that some strings might be hidden in libraries' code (e.g. error messages), or in JavaScript libraries and scripts.</p> -<p>If you are using pure HTML instead of gettext to localize your webapp, consider using an additional gettext-like format such as <a class="link-https" href="https://wiki.mozilla.org/L10n:Requirements/Web_l10n_filetypes#.lang_files" title="https://wiki.mozilla.org/L10n:Requirements/Web_l10n_filetypes#.lang_files">.lang</a> to streamline localizers' work with repeating content. This is useful for strings occurring in the webapp multiple times, like "return to top", "comments", "click to see larger image" etc. Might be also helpful for headers and footers, if you're not using templates to display them.</p> -<p>In most of the cases though, you should use gettext whenever technically possible (i.e. the server's PHP has been built with gettext support).</p> -<h3 id="Localize_the_date_format">Localize the date format</h3> -<p>Localizing the date format is as easy as localizing any other string. Just let the localizers localize the format specification string.</p> -<p><strong>Snippet 1. Bad:</strong></p> -<pre class="brush: php">$persona['date'] = date("n/j/Y", strtotime($persona['approve'])); -</pre> -<p><strong>Snippet 2. Good:</strong></p> -<pre class="brush: php">$persona['date'] = date(_("n/j/Y"), strtotime($persona['approve'])); -</pre> -<h3 id="Localize_the_number_format">Localize the number format</h3> -<p>You can make the number format localizable using the information returned by <a class="external" href="http://php.net/manual/en/function.localeconv.php" title="http://php.net/manual/en/function.localeconv.php">localeconv()</a> in PHP.</p> -<p><strong>Snippet 1. Bad:</strong></p> -<pre class="brush: php">printf(_("%s MB>"), $size); -</pre> -<p><strong>Snippet 2. Good:</strong></p> -<pre class="brush: php">function num_format($num, $decimals) { - $locale_info = localeconv(); - return number_format($num, $decimals, $locale_info['decimal_point'], $locale_info['thousands_sep']); -} - -printf(_("%s MB"), num_format($size, 1)); -</pre> -<h3 id="Wrap_as_few_HTML_tags_as_possible">Wrap as few HTML tags as possible</h3> -<p>When wrapping the localizable content with the gettext function calls, put all the code that irrelevant to localization outside the function call.</p> -<p><strong>Snippet 1. Bad:</strong></p> -<pre class="brush: php"><?= _("<a href=\"https://addons.mozilla.org/firefox/downloads/latest/10900\" class=\"get-personas\" id=\"download\"><span>Get Personas for Firefox - Free</span>");?><span class="arrow"></span></a> -</pre> -<p><strong>Snippet 2. Good:</strong></p> -<pre class="brush: php"><a href="https://addons.mozilla.org/firefox/downloads/latest/10900" class="get-personas" id="download"> - <span><?= _("Get Personas for Firefox - Free");?></span><span class="arrow"></span> -</a></pre> -<p> </p> -<p><strong>Snippet 3. Bad:</strong></p> -<pre class="brush: php"><p><?= _("<strong class=\"legal\">Design Acceptance:</strong> If a design is accepted, we will send the following message:");?></p> -<p><?= _("<strong class=\"legal\">Design Rejection:</strong> If a design is rejected, we will send the following message:");?></p> -</pre> -<p><strong>Snippet 4. Good:</strong></p> -<pre class="brush: php"><p><strong class="legal"><?= _("Design Acceptance:");?></strong> <?= _("If a design is accepted, we will send the following message:");?></p> -<p><strong class="legal"><?= _("Design Rejection:");?></strong> <?= _("If a design is rejected, we will send the following message:");?></p></pre> -<p> </p> -<p><strong>Snippet 5. Bad:</strong></p> -<pre class="brush: php"><p id="breadcrumbs"> - <?printf(_("<a href=\"%s\">Personas Home</a> : <a href=\"%s\">Sign In</a> : Forgot Your Password?"), - $locale_conf->url('/'), - $locale_conf->url('/signin'));?> -</p> -</pre> -<p><strong>Snippet 6. Good:</strong></p> -<pre class="brush: php"><p id="breadcrumbs"> - <?printf("<a href=\"%s\">" . _("Personas Home") . "</a> : <a href=\"%s\">" . _("Sign In") . "</a> : " . _("Forgot Your Password?"), - $locale_conf->url('/'), - $locale_conf->url('/signin'));?> -</p></pre> -<p> </p> -<p><strong>Snippet 7. Bad:</strong></p> -<pre class="brush: php"><p class="description"><?= _("<strong>Description:</strong>");?></p></pre> -<p><strong>Snippet 8. Good:</strong></p> -<pre class="brush: php"><p class="description"><strong><?= _("Description:");?></strong></p></pre> -<p> </p> -<p><strong>Snippet 9. Good:</strong></p> -<pre class="brush: php"><h1> - <?printf("<a href=\"%s\"><img src=\"/static/img/logo.png\" alt=\"" . _("Mozilla Labs Personas") . "\" /></a>", - $locale_conf->url('/'));?> -</h1> -</pre> -<p><strong>Snippet 10. Better:</strong></p> -<pre class="brush: php"><h1> - <a href="<?= $locale_conf->url('/') ?>"> - <img src="/static/img/logo.png" alt="<?= /* L10N: link title attribute */ _("Mozilla Labs Personas"); ?> " /> - </a> -</h1></pre> -<h3 id="...but_don't_sacrifice_flexibility">...but don't sacrifice flexibility</h3> -<p>Don't sacrifice flexibility trying to satisfy the rule above. Make sure the content supports changing the order of the sentence, which may be required by some grammars.</p> -<p><strong>Snippet 1. Bad:</strong></p> -<pre class="brush: php"><p class="added"><?= _("<strong>Added:</strong>") . $persona['date']; ?></p></pre> -<p><strong>Snippet 2. Bad:</strong></p> -<pre class="brush: php"><p class="added"><strong><?= _("Added:") ?></strong><?= $persona['date']; ?></p></pre> -<p><strong>Snippet 3. Good:</strong></p> -<pre class="brush: php"><p class="added"><? printf( /* L10N: %s is a date */ _("<strong>Added:</strong> %s"), $persona['date']);?></p></pre> -<p>The first bad snippet puts the <code><strong/></code> HTML elements inside the gettext function call and concatenates the <code>$persona['date']</code> variable to it. Following the rule about wrapping as few HTML elements with the gettext function call as possible, you could try to put the <code><strong/></code> HTML tag outside of the PHP code (cf. snippet 2). However, in this snippet, the concatenation of the <code>$persona['date']</code> variable is still hardcoded and only allows one ordering of the sentence, while some grammars might require, for instance, to put the date in front of the "Added" descriptor. For this reason, it is better to leave the <code><strong/></code> HTML tags inside the gettext function call and take advantage of the <code>printf()</code> variable that will be substituted by the date upon interpretation of the code (snippet 3).</p> -<p><strong>Snippet 4. Good:</strong></p> -<pre class="brush: php"><h3> - <?printf( /* L10N: %s is the author's username */ _("created by <a href=\"%s\">%s</a>"), - $locale_conf->url('/gallery/Designer/' . $persona['author']), - $persona['display_username']);?> -</h3></pre> -<p>In this example the link is in the <code>_()</code> call so that localizers can adjust the position of the author's name, depending on the grammar of their language.</p> -<h3 id="Use_printf()_for_string_substitution">Use printf() for string substitution</h3> -<p>Whenever there is content that will change, either upon interpretation of the code or as part of development, don't use concatenation. Instead, use <code>printf()</code> and string formatting. For instance, don't put URIs into msgid's. If you do, if the static URI changes, you'll have to regenerate the *.po files to include the new msgids.</p> -<p><strong>Snippet 1. Bad:</strong></p> -<pre class="brush: php"><?= _("View a sample Persona Header <b><a href=\"/static/img/Persona_Header_LABS.jpg\">here</a></b>.");?></pre> -<p><strong>Snippet 2. Good:</strong></p> -<pre class="brush: php"><?php printf(_("View a sample Persona Header <b><a href=\"%s\">here</a></b>."), '/static/img/Persona_Header_LABS.jpg'); ?></pre> -<p> </p> -<p><strong>Snippet 3. Bad:</strong></p> -<pre class="brush: php"><p><?=_("If you are interested in supporting the approval process by becoming an approver, please email <a href=\"mailto:personas@mozilla.com\">personas@mozilla.com</a>.")?></p></pre> -<p><strong>Snippet 4. Good:</strong></p> -<pre class="brush: php"><p><?= printf(_("If you are interested in supporting the approval process by becoming an approver, please email <a href=\"mailto:%s\">%s</a>."), - 'personas@mozilla.com', - 'personas@mozilla.com')?> -</p></pre> -<p><strong>Snippet 5. Also good:</strong></p> -<pre class="brush: php"><p><?= printf(_("If you are interested in supporting the approval process by becoming an approver, please email <a href=\"mailto:%1$s\">%1$s</a>."), - 'personas@mozilla.com')?> -</p></pre> -<p>The same goes for variables that are unknown until the code is interpreted. Localizers should have a possibility to adapt the order of the sentence (including the variable part) to the grammar and preferred style used in their language. Consider the following example.</p> -<p><strong>Snippet 6. Bad:</strong></p> -<pre class="brush: php"><p class="added"><?= _("<strong>Added:</strong>") . $persona['date']; ?></p></pre> -<p><strong>Snippet 7. Good:</strong></p> -<pre class="brush: php"><p class="added"><? printf( /* L10N: %s is a date */ _("<strong>Added:</strong> %s"), $persona['date']);?></p></pre> -<p>In Snippet 6 the concatenation causes the ordering of the sentence to be fixed, while some grammars might require, for instance, to put the date in front of the "Added" descriptor. You should take advantage of the <code>printf()</code> variable that will be substituted by the date upon interpretation of the code (snippet 7).</p> -<h3 id="Use_gettext_comments">Use gettext comments</h3> -<p>Use comments in the code to help localizers understand what they are translating. You can explain where the string will appear in the application, or what the variables used in the string will be replaced with. Put comments in the same line as the gettext function call (inline comments, in PHP these are <code>/* ... */</code>), or one line directly above the gettext function call (block comments, in PHP they start with <code># ...</code> or <code>// ...</code>). In either way, use a consistent prefix for localization-related comments, e.g. "L10n". When extracting strings with <a class="external" href="http://www.gnu.org/software/hello/manual/gettext/xgettext-Invocation.html" title="http://www.gnu.org/software/hello/manual/gettext/xgettext-Invocation.html"><code>xgettext</code></a> you will be able to include only comments starting with this prefix using the <code>--add-comments=PREFIX</code> option, for example <code>xgettext --add-comments=L10n</code>.</p> -<p><strong>Snippet 1. Bad:</strong></p> -<pre class="brush: php"><h1> - <a href="<?= $locale_conf->url('/') ?>"> - <img src="/static/img/logo.png" alt="<?= _("Mozilla Labs Personas"); ?>" /> - </a> -</h1> -</pre> -<p><strong>Snippet 2. Good:</strong></p> -<pre class="brush: php"><h1> - <a href="<?= $locale_conf->url('/') ?>"> - <img src="/static/img/logo.png" alt="<?= /* L10n: link title attribute */ _("Mozilla Labs Personas") ?> " /> - </a> -</h1></pre> -<p> </p> -<p><strong>Snippet 3. Bad:</strong></p> -<pre class="brush: php"><p class="added"><? printf(_("<strong>Added:</strong> %s"), $persona['date']);?></p> -</pre> -<p><strong>Snippet 4. Good:</strong></p> -<pre class="brush: php"><p class="added"><? printf( /* L10N: %s is a date */ _("<strong>Added:</strong> %s"), $persona['date']);?></p></pre> -<p> </p> -<p><strong>Snippet 5. Bad:</strong></p> -<pre class="brush: php">printf(_("%1$s by %2$s"), $persona['name'], $persona['display_username']); -</pre> -<p><strong>Snippet 6. Good:</strong></p> -<pre class="brush: php">// %1$s is persona name, %2$s is athor's username -printf(_("%1$s by %2$s"), $persona['name'], $persona['display_username']); -</pre> -<h3 id="Use_printf_variables_swapping">Use printf variables swapping</h3> -<p>Use <code>printf()</code> ordered variables (<code>%1$s</code>, <code>%2$s</code>, etc.) to allow changes to the order of the sentence. Some languages may require this. Remember to use single quotes around the strings containing the formatting symbols. Otherwise, PHP will treat <code>$s</code> as a regular variable, instead of parsing the whole <code>%1$s</code> formatting symbol.</p> -<p><strong>Snippet 1. Bad:</strong></p> -<pre class="brush: php">$page_header = $persona['name'] . ' by ' . $persona['display_username'];</pre> -<p><strong>Snippet 2. Better:</strong></p> -<pre class="brush: php">printf(_("%s by %s"), $persona['name'], $persona['display_username']);</pre> -<p><strong>Snippet 3. Good:</strong></p> -<pre>// %1$s is the persona's name, %2$s is the athor's username -printf(_('%1$s by %2$s'), $persona['name'], $persona['display_username']);</pre> -<p>Note the single quotes around <code>'%1$s by %2$s'</code>.</p> -<h3 id="Don't_nest_gettext_calls">Don't nest gettext calls</h3> -<p><strong>Snippet 1. Bad:</strong></p> -<pre class="brush: php"><?printf(_("<a href=\"%s\">" . _("Personas Home") . "</a> : How to Create Personas"), $locale_conf->url('/'));?></pre> -<p><strong>Snippet 2. Good:</strong></p> -<pre class="brush: php"><?printf("<a href=\"%s\">" . _("Personas Home") . "</a> : " . _("How to Create Personas"), $locale_conf->url('/'));?></pre> -<h3 id="Don't_break_long_text_content_into_multiple_strings">Don't break long text content into multiple strings</h3> -<p>Don't break long text messages into smaller pieces if the text is a coherent whole. Examples include long paragraphs or e-mail bodies. Gettext doesn't specify the order of the strings in the messages.po file, so a localizer may end up seeing the partial strings of your content scattered all over the file. If you really have to use multiple strings, then make sure you're using comments or event contexts to let localizers know which part they're translating (<em>cf.</em> snippet 2 below).</p> -<p><strong>Snippet 1. Bad:</strong></p> -<pre>echo _("Long text\n"); -echo _("Second part\n"); -echo _("Third part\n");</pre> -<p><strong>Snippet 2. Still bad (but slightly better than snippet 1):</strong></p> -<pre># L10n: Long text example, part 1. -echo _("Long text\n"); -# L10n: Long text example, part 2. -echo _("Second part\n"); -# L10n: Long text example, part 3. -echo _("Third part\n");</pre> -<p><strong>Snippet 3. Good:</strong></p> -<pre># L10n: No indentation is possible after the first line. -echo _("Long text -Second part -Third part\n");</pre> -<p><strong>Snippet 4. Good (even better):</strong></p> -<pre># L10n: You can indent lines to your liking. -echo _("Long text\n" - . "Second part\n" - . "Third part\n");</pre> -<p>The solution in snippet 3 doesn't allow to use code indentation for "Second part" and "Third part". If you indent "Second part", the resulting string (interpreted by PHP and Gettext) will end up indented as well. It is thus recommended to use the solution from snippet 4. Consider the following example:</p> -<p><strong>Snippet 5. Bad indentation:</strong></p> -<p>PHP code:</p> -<pre># L10n: This will be wrongly indented. -echo _("Long text - Second part - Third part\n");</pre> -<p>PHP output:</p> -<pre>Long text - Second part - Third part -</pre> -<p>messages.po:</p> -<pre>#. L10n: This will be wrongly indented. -msgid "" -"Long text\n" -" Second part\n" -" Third part\n" -msgstr ""</pre> -<p>In order to indent your code, you must use string concatenation. See snippet 4 above for an example of how to do this.</p> -<h3 id="Use_gettext_contexts">Use gettext contexts</h3> -<p>Depending on context in which it is used, one English string might require two or more different translations. This is particularly true for short strings, like "File" or "Log in". For instance, "Log in" as a button label might be translated by a localizer as the imperative, but for a dialog title, the localizer may choose to use a different form, like gerund (much like "Logging in"). <a href="/en/gettext#Using_context_with_msgctxt" title="en/gettext#Using context with msgctxt">Gettext's context feature</a> allows the developer to distinguish between two identical English strings and disambiguate the translation.</p> -<h3 id="Use_gettext_plurals">Use gettext plurals</h3> -<p>Whenever you put numbers in your messages, make it possible to use different singular and plural forms.</p> -<p><strong>Snippet 1. Bad:</strong></p> -<pre class="brush: php">print '<p class="numb-users">' . sprintf(_("%d active daily users"), number_format($persona['popularity'])) . '</p>';</pre> -<p><strong>Snippet 2. Good:</strong></p> -<pre class="brush: php">print '<p class="numb-users">' . sprintf(ngettext("%d active daily user", "%d active daily users"), - number_format($persona['popularity'])) . '</p>';</pre> -<p>One might argue that adding plural support here is not necessary because, for instance, the number of daily users in the example above will always be greater than 1, i.e. will always require the use of the plural form. While this is true for English, it should be noted that some languages require different forms of strings for numbers greater than 1 as well. For example, all numbers ending in 2, 3 or 4 (be it 21 or 1021) might require a special plural form.</p> -<p>Read more about <a href="/en/gettext#Plurals" title="en/gettext#Plurals">plurals in gettext</a> and about <a href="/en/Localization_and_Plurals" title="en/Localization and Plurals">plural rules for different languages</a>.</p> -<h3 id="Don't_use_text_as_decoration">Don't use text as decoration</h3> -<p><span style="color: rgb(128, 128, 128);"> <em>This needs more work.</em></span></p> -<pre><?printf("<a href=\"%s\">" . _("Step 3: Testing your Persona Images") . "</a> &raquo;", $locale_conf->url('/demo_create_3'));?> -<?printf("<a href=\"%s\">" . _("Step 2: Creating a Persona Footer Image") . "</a> &raquo;", $locale_conf->url('/demo_create_2'));?> -<?printf("<a href=\"%s\">" . _("Step 4: Submit your Persona!") . "</a> &raquo;", $locale_conf->url('/demo_create_4'));?> - -<div class="tut_left"><?printf("<b>&laquo; <a href=\"%s\">" . _("Back to Step 1") . "</a></b>", $locale_conf->url('/demo_create'));?></div> -<div class="tut_right"><?printf("<b><a href=\"%s\">" . _("Continue to Step 3") . "</a> &raquo;</b>", $locale_conf->url('/demo_create_3'));?></div></pre> -<p>Using <code>&laquo;</code> and <code>&raquo;</code> should be OK here for RTL languages (they are flipped correctly if there are no Latin characters next to them, which there aren't any), so let's leave it as it is. In general though, we should consider implementing such decorations as CSS images (background-image or ::after's/::before's content) and then select them with "html[dir="rtl"] > ...". It a safer method.</p> -<pre class="brush: php"><?php if($showWearThis) { ?> - $(".try-button").personasButton({ - 'hasPersonas':'<span><?= _("wear this");?></span><span>&nbsp;</span>', - 'hasFirefox':'<span><?= _("get personas now!");?></span><span>&nbsp;</span>', - 'noFirefox':'<span><?= _("get personas with firefox");?></span><span>&nbsp;</span>' - }); -<?php } ?></pre> -<h2 id="Images_2">Images</h2> -<h3 id="Don't_put_text_or_numbers_in_the_images">Don't put text or numbers in the images</h3> -<p>Just don't do that. Applies also to numbers.</p> -<p><strong>Image 1. Bad:</strong></p> -<p><img alt="personas-btn-get.png" class="internal default" src="/@api/deki/files/3806/=personas-btn-get.png"></p> -<p><strong>Image 2. Bad:</strong></p> -<p><img alt="personas-faq-header.png" class="internal default" src="/@api/deki/files/3807/=personas-faq-header.png"></p> -<p>If you wish to use a non-standard font (as in the image above), take advantage of the CSS's on-line fonts feature available via <a href="/en/CSS/@font-face" title="en/CSS/@font-face">@font-face</a>.</p> -<p><strong>Image 3. Bad:</strong></p> -<p><img alt="personas-logo-beta.png" class="internal default" src="/@api/deki/files/3808/=personas-logo-beta.png"></p> -<p>The trouble with the above image is the "for Firefox" part, which should be made localizable. Keep in mind that you should allow to localize the whole "for Firefox" part, not only the "for" preposition to which you'd concatenate the "Firefox" part. That's because some languages might require changing the word order, and others might require putting the word Firefox in the correct grammatical case.</p> -<p><strong>Image 4. Bad:</strong></p> -<p><img alt="feature-bg-performance.png" class="internal default" src="/@api/deki/files/3815/=feature-bg-performance.png"></p> -<p><strong>Image 5 & Snippet 1. Good:</strong></p> -<p>Image file (<code>/img/tignish/firefox/performance-chart.png</code>):</p> -<p><img alt="performance-chart.png" class="internal default" src="/@api/deki/files/3816/=performance-chart.png"></p> -<p>HTML: <span style="font-size: x-small;">(in this case, no gettext was used and the localizers worked on pure HTML files)</span></p> -<pre><div id="performance-chart"> - <h4>Firefox Performance: Fast — Faster — <em>Fastest</em></h4> - <p>Results of a SunSpider test on a Windows XP machine</p> - <img src="/img/tignish/firefox/performance-chart.png" alt="Firefox 2, Firefox 3, Firefox 3.5 performance chart" /> - <ul> - <li>18,148 ms</li> - <li>3,669 ms</li> - <li>1,524 ms!</li> - </ul> -</div></pre> -<p>In the above example, not only does the text above the clock charts require translation, but so do the milliseconds captions below them. Many languages use different number formats than English, like <em>18 148</em> or <em>18.148</em>. Also, the last caption includes an exclamation mark, and for some languages (e.g. French), the orthographic rules might require putting a space between the exclamation mark and the preceding word.</p> -<h3 id="Make_icons_flippable_for_RTL">Make icons flippable for RTL</h3> -<p><strong>Image 1. </strong></p> -<p><img alt="question-64.png" class="internal default" src="/@api/deki/files/3809/=question-64.png"></p> -<p>This icon should have its right-to-left equivalent, with the "؟" character which is used in some RTL languages, like Arabic and Persian (note that Hebrew uses "?"). You should then display the right icon depending on the locale. The following example shows how to achieve this with CSS.</p> -<p><strong>Snippet 1. Bad:</strong></p> -<pre class="brush: php"><div class="tut_didyouknow"> - <img src="/static/img/question-64.png" class="tut_icon"> - <?printf (_("Did you know you can test a Persona before you submit it? <b><a href=\"%s\">Find out how!</a>&raquo;</b>"), - $locale_conf->url('/demo_create_3#test'));?> -</div></pre> -<p><strong>Snippet 2. Good:</strong></p> -<p>CSS:</p> -<pre class="brush: css">div.tut_didyouknow { - background: url(/static/img/question-64.png) no-repeat 0 0; - padding-left: 64px; -} - -html[dir='rtl'] div.tut_didyouknow { - background-image: url(/static/img/question-64.png); - background-position: 100% 0; - padding-left: 0; - padding-right: 64px; -} -</pre> -<p>HTML/PHP:</p> -<pre class="brush: php"><div class="tut_didyouknow"> - <?printf (_("Did you know you can test a Persona before you submit it? <b><a href=\"%s\">Find out how!</a>&raquo;</b>"), - $locale_conf->url('/demo_create_3#test'));?> -</div></pre> -<p>Notice that the icon has been moved to CSS, so that it doesn't sit in a <code><img/></code> element. This is generally considered a good practice for decorative graphics.</p> -<h3 id="Don't_use_images_as_buttons">Don't use images as buttons</h3> -<p>Instead, use <code><button/></code> and style it with CSS.</p> -<p><strong>Image 1. Bad:</strong></p> -<p><img alt="tut_btn_getStarted.gif" class="internal default" src="/@api/deki/files/3811/=tut_btn_getStarted.gif"></p> -<p><strong>Snippet 1. Good:</strong></p> -<p>CSS:</p> -<pre class="brush: css">.button { - font-weight: bold; - color: #0077a6; - font-family: Arial, sans-serif; - border: none; - background: none; - cursor: pointer; - overflow: visible; - width: auto; - height: 30px; - text-decoration: none; - vertical-align: middle; -} - -.button span { - background: #fff url(../img/main-sprites.png) no-repeat scroll -384px 1px; - display:inline; - line-height: 25px; - padding: 6px 6px 6px 10px; -} - -.button .arrow { - background: transparent url(../img/main-sprites.png) no-repeat scroll -651px 1px; - padding: 6px 15px; -} - -html[dir='rtl'] .button .arrow { - /* Flip the arrow to point to the left*/ - background: transparent url(../img/main-sprites.png) no-repeat scroll -601px 1px; -} -</pre> -<p>HTML/PHP:</p> -<pre class="brush: php"><button type="submit" class="button"><span><?= _('get started'); ?></span><span class="arrow"></span></button> -</pre> -<h3 id="Don't_put_captions_in_the_images">Don't put captions in the images</h3> -<p><strong>Image 1. Bad:</strong></p> -<p><a href="/@api/deki/files/3813/=tut_headerImage.jpg" title="tut_headerImage.jpg"><img alt="tut_headerImage.jpg" class="internal default" src="/@api/deki/files/3813/=tut_headerImage.jpg?size=webview" style="width: 349px; height: 102px;"></a></p> diff --git a/files/ar/mozilla/localization/web_localizability/index.html b/files/ar/mozilla/localization/web_localizability/index.html deleted file mode 100644 index d8a814e46b..0000000000 --- a/files/ar/mozilla/localization/web_localizability/index.html +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Web Localizability -slug: Mozilla/Localization/Web_Localizability -tags: - - Internationalization - - Localizability - - Localization - - NeedsTranslation - - TopicStub - - Web Development -translation_of: Mozilla/Localization/Web_Localizability ---- -<p>Localizability (or <em>l12y</em> for short) is a characteristic found in an application or content that enables localization. The following list contains links to pages that highlight steps that can be taken to make web content localizable. The documentation is divided into 4 parts:</p> -<ol> <li><a href="/en/Web_Localizability/Creating_localizable_web_content" title="en/Web Localizability/Creating localizable web content">How to create localizable content.</a></li> <li><a href="/en/Web_Localizability/Localization_formats" title="en/Web Localizability/Localization formats">How to choose the right localization format.</a></li> <li><a href="/en/Web_Localizability/Creating_localizable_web_applications" title="en/Web Localizability/Creating localizable web applications">How to create localizable web applications.</a></li> <li><a href="/en/Web_Localizability/Setting_up_the_infrastructure" title="en/Web Localizability/Setting up the infrastructure">How to set up the infrastructure for localization.</a></li> -</ol> -<h3 id="Why_localizability_is_important">Why localizability is important</h3> -<p>There are many reasons why you should start thinking about making your web app localizable as soon as possible.</p> -<ol> <li>You will make localizer's life easier, for which they will be grateful.</li> <li>You will have quality content, localized and adapted to the needs of the local market.</li> <li>Extending you web app to support new languages will be easy.</li> <li>The content will be easier to maintain and update.</li> <li>You will end up writing more semanticly-correct code, which is good for your SEO.</li> <li>By reviewing your content and code for l12y, you will find and fix bugs in your original language too.</li> -</ol> diff --git a/files/ar/mozilla/localization/الترجمة_مع_بونتوون/index.html b/files/ar/mozilla/localization/الترجمة_مع_بونتوون/index.html deleted file mode 100644 index 5feb5c26be..0000000000 --- a/files/ar/mozilla/localization/الترجمة_مع_بونتوون/index.html +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: الترجمة باستخدام بونتوون -slug: Mozilla/Localization/الترجمة_مع_بونتوون -translation_of: Mozilla/Localization/Localizing_with_Pontoon ---- -<p dir="rtl">يعد <a href="https://pontoon.mozilla.org">بونتوون</a> اداة ترجمة (l10n) من نوع "<em>ما تراه هو ما تحصل عليه</em>" (WYSIWYG). نستخدم بونتوون في موزيلا لترجمة جميع المنتجات و المواقع، ابتداءً من فايرفوكس إلى موقع موزيلا. يعد بونتوون أداة بسيطة جداً وبديهية والتي تتطلب مهارات قليلة غير تقنية لاستخدامها في الترجمة. هنا، سوف نناقش كيف يمكنك استخدام بونتوون لترجمة المشاريع، ابتداءً من ولوجك للموقع إلى إنهاء مساهمتك. في أثناء الشرح سنشير إلى بعض المزايا المفيدة التي ستجعل مساهمتك أكثر فعالية و سهولة.</p> - -<div class="note" dir="rtl"> -<p><strong>هل أنت مطور؟ </strong>أقرأ حول <a href="/en-US/docs/Implementing_Pontoon_Mozilla">استخدام بونتوون في مشروعك</a> أو تعلم كيفية المساهمة في المشروع على <a href="https://github.com/mozilla/pontoon">غيت هاب</a>.</p> -</div> - -<h2 dir="rtl" id="الخطوات_الأولى">الخطوات الأولى</h2> - -<p dir="rtl">تعد <a href="https://pontoon.mozilla.org">الصفحة الرئيسية لموقع بونتوون</a> سهلة الاستخدام. لبدئ ترجمة مشروع قم بالضغط على أيقونة الشخصية في الأعلى وسجل دخولك. بعد ذلك، قم ببساطة باختيار المشروع الذي تريد العمل عليه واللغة من القوائم المسندلة. سيقوم بونتوون تلقائياً بفتح مشروع الترجمة من أجل البدئ. لاحظ أنه في حالتنا سنقوم باستخدام موقع <a href="https://affiliates.mozilla.org/">Firefox Affiliates</a> كعينة لإظهار وظائف وطريقة عمل بونتوون. والصورة التالية توضح شكل الموقع وهو مفتوح بداخل بونتوون:</p> - -<p><em><img alt="Browser app and workspace" src="https://mdn.mozillademos.org/files/8323/affiliates.png" style="height: 558px;"></em></p> - -<h3 dir="rtl" id="شريط_الأدوات_الرئيسي">شريط الأدوات الرئيسي</h3> - -<p dir="rtl">كما ترى، الموقع الذي يتم ترجمته يملأ معظم الواجهة. فقط شريط الأدوات يخص بونتوون، والذي يحتوي العناصر التالية (من اليسار إلى اليمين):</p> - -<p><img alt="Main toolbar" src="https://mdn.mozillademos.org/files/8325/toolbar.png"></p> - -<h4 dir="rtl" id="قائمة_بالنصوص">قائمة بالنصوص</h4> - -<p dir="rtl">لفتح شريط جانبي بقائمة فيها جميع النصوص لترجمتها.</p> - -<h4 dir="rtl" id="محدد_المشروع_(بحالتنا_Affiliates)">محدد المشروع (بحالتنا Affiliates)</h4> - -<p dir="rtl">للتبديل بين المشاريع لترجمتها.</p> - -<h4 dir="rtl" id="محدد_المورد_(بحالتنا_الصفحة_الرئيسية)"><span id="cke_bm_939S" style="display: none;"> </span>محدد المورد (بحالتنا الصفحة الرئيسية)</h4> - -<p dir="rtl">للتبديل بين موارد المشروع لترجمتها، مثل الصفحات الفرعية أو ملفات الترجمة. ويكون هذا الخيار مخفي في حالة عدم وجود موارد متوفرة للمشروع.</p> - -<h4 dir="rtl" id="محدد_اللغة_(بحالتنا_السلوفينية)"><span id="cke_bm_940S" style="display: none;"> </span>محدد اللغة (بحالتنا السلوفينية)</h4> - -<p dir="rtl">للتبديل بين اللغات للترجمة.</p> - -<h4 id="sect1"><span id="cke_bm_941S" style="display: none;"> </span></h4> - -<dl> -</dl> - -<h4 dir="rtl" id="انطلاق">انطلاق</h4> - -<p dir="rtl">لتطبيق الخيارات السابقة.</p> - -<h4 dir="rtl" id="مؤشر_التقدم">مؤشر التقدم</h4> - -<p dir="rtl">لعرض تقدمك في المورد الذي يجري ترجمته. يتم عرض المزيد من التفاصيل في النافذة المنبثقة (عند الضغط على المؤشر).</p> - -<dl> -</dl> - -<h4 dir="rtl" id="سسسسقائمة_المستخدم"><span id="cke_bm_943S" style="display: none;">سسسس</span>قائمة المستخدم</h4> - -<p dir="rtl">تسمح بالقيام بمهام مخصصة بالمستخدم، مثل الإيداع إلى مستودع، وتحميل الملفات، وتسجيل الخروج.</p> - -<h4 dir="rtl" id="قائمة_المعلومات">قائمة المعلومات</h4> - -<p dir="rtl">تقدم معلومات مهمة، <span id="result_box" lang="ar"><span>مثل الجدول الزمني المتوقع للمشروع وقائمة باختصارات لوحة المفاتيح.</span></span></p> - -<p dir="rtl">حسناً، والآن كيف يمكننا القيام ببعض الترجمة؟</p> - -<dl> -</dl> - -<dl> -</dl> - -<h2 dir="rtl" id="ترجمة_النصوص">ترجمة النصوص</h2> - -<p dir="rtl">عندما تستخدم بونتوون في الترجمة، لديك بضعة خيارات لتترجم نصوصك. حيث يمكنك الترجمة من محتوى الموقع مباشرة (بالمحتوى)، أو بشريط جانبي يظهر النصوص وترجمتها (خارج المحتوى) أو يمكنك استخدام كليهما. سنبدأ بنظرة على الترجمة بالمحتوى.</p> - -<h3 dir="rtl" id="الترجمة_بالمحتوى">الترجمة بالمحتوى</h3> - -<p dir="rtl">وضع الترجمة بالمحتوى الخاص ببونتوون هو عبارة عن استبدال النصوص بترجمتها. فهو يقوم بفتح صفحة ويب (أو تطبيق ويب) ويسمح بتحرير مباشر على نصوص الصفحة. هذه الصورة تظهر كيفية ترجمة نصك الأول:</p> - -<p><img alt="In-context localization" src="https://mdn.mozillademos.org/files/8331/in-context.png"></p> - -<ol dir="rtl"> - <li>قم بتحويم (تمرير) الفأرة فوق النص الذي تريد ترجمته.</li> - <li>سوف يظهر زر تعديل فوق النص. قم بالضغط عليه لتفعيل وضع الترجمة.</li> - <li>استبدل النص الأصلي بنظيره المقابل باللغتك.</li> - <li>قم بالضغط على زر الحفظ لحفظ ترجمتك.</li> -</ol> - -<div> -<h3 dir="rtl" id="الترجمة_خارج_المحتوى">الترجمة خارج المحتوى</h3> - -<p dir="rtl">بعض النصوص من المستحيل ترجمتها بوضع الترجمة بالمحتوى، مثل محتوى الوسم <title> في الموقع. عند الضغط على أيقونة الهمبورغر (الأيقونة التي تشبه شطيرة اللحم) في قائمة الأدوات، سيتم فتح شريط جانبي يحتوي على قائمة النصوص والترجمات المتوفرة. يمكنك استخدام هذا الشريط الجانبي للترجمة بوضع خارج المحتوى:</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 dir="rtl"> - <li>قم بالضغط على النص الذي تريد ترجمته. </li> - <li>سيفتح شريط يحتوي على النص الأصلي وتفاصيله (مثل التعليقات).</li> - <li>قم بترجمة النص في منطقة الترجمة أدناه.</li> - <li>قم بالضغط على زر الحفظ لحفظ ترجمتك.</li> -</ol> - -<p dir="rtl">بينما تقوم بالترجمة بوضع الترجمة خارج المحتوى، ستظهر هذه الترجمة أيضاً في الموقع (إن كانت قابلة للترجمة بوضع المحتوى).</p> - -<h3 dir="rtl" id="مساعدات_الترجمة">مساعدات الترجمة</h3> - -<p dir="rtl">كما ترى، الإقتراحات من السجل، وذاكرة الترجمة، والترجمة الآلية وغيرها من الترجمات (باللغات مختلفة) متوفرة في شريط الترجمة خارج المحتوى. ندعو كل ما سبق بمساعدات الترجمة وهنا سنسرد كيف ستساعدك كلاً منهم أثناء ترجمتك للنصوص:</p> -</div> - -<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 dir="rtl" id="السجل">السجل</h4> - -<p dir="rtl">يعرض الترجمات المقترحة سابقاً، متضمناً الترجمات من مستخدمين أخرين.</p> - -<h4 dir="rtl" id="الآليات_(تقنيات_آلية)">الآليات (تقنيات آلية)</h4> - -<p dir="rtl">تعرض الترجمات المتطابقة من خدمات متنوعة: ذاكرة الترجمة الداخلية، و <a href="http://transvision.mozfr.org/">موزيلا ترانسفيسيون</a>، و <a href="https://amagama-live.translatehouse.org/">ذاكرة الترجمة المفتوحة المصدر</a>، و <a href="http://www.microsoft.com/Language/">مصطلح مايكروسوفت</a>، و <a href="http://www.bing.com/translator">مترجم آلي</a>.</p> - -<h4 dir="rtl" id="ترجمات_أخرى">ترجمات أخرى</h4> - -<p dir="rtl">تعرض ترجمات متطابقة من لغات أخرى.</p> - -<h4 dir="rtl" id="البحث">البحث</h4> - -<p dir="rtl">تشبه تقريباً الآليات، ولكنها تأخد مدخلات كمعاملات بدلاً من النص الأصلي.</p> - -<p dir="rtl">بالضغط على إقتراح، سيتم نسخ النص المترجم (الذي أدخلته) إلى منطقة الترجمة.</p> - -<dl> -</dl> - -<h2 dir="rtl" id="نشر_ترجمتك">نشر ترجمتك</h2> - -<p dir="rtl">لنفترض أنك تريد الآن نشر ترجمتك بإيداعها إلى مستودع. يوفر لك بونتوون ميزة للقيام بذلك أيضاً! في الحقيقة، إنه يقوم بهذا تلقائياً بالمزامنة مع المستودع دورياً. يمكنك الأن أن تشعر بالرضى، تقوم برقصة صغيرة، تذهب إلى النوم أو أن تفعل شيئاً أخر للاحتفال بعملك!</p> |