CINXE.COM

Bugzilla:L10n:Guide - MozillaWiki

<!DOCTYPE html> <html class="client-nojs" lang="en" dir="ltr"> <head> <meta charset="UTF-8"/> <title>Bugzilla:L10n:Guide - MozillaWiki</title> <script>document.documentElement.className="client-js";RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"4df094c2ee4dee75e7954fe7","wgCSPNonce":false,"wgCanonicalNamespace":"Bugzilla","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":122,"wgPageName":"Bugzilla:L10n:Guide","wgTitle":"L10n:Guide","wgCurRevisionId":1096895,"wgRevisionId":1096895,"wgArticleId":22666,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Bugzilla","L10n"],"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Bugzilla:L10n:Guide","wgRelevantArticleId":22666,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgPageFormsTargetName":null, "wgPageFormsAutocompleteValues":[],"wgPageFormsAutocompleteOnAllChars":false,"wgPageFormsFieldProperties":[],"wgPageFormsCargoFields":[],"wgPageFormsDependentFields":[],"wgPageFormsCalendarValues":[],"wgPageFormsCalendarParams":[],"wgPageFormsCalendarHTML":null,"wgPageFormsGridValues":[],"wgPageFormsGridParams":[],"wgPageFormsContLangYes":null,"wgPageFormsContLangNo":null,"wgPageFormsContLangMonths":[],"wgPageFormsHeightForMinimizingInstances":800,"wgPageFormsShowOnSelect":[],"wgPageFormsScriptPath":"/extensions/PageForms","edgValues":null,"wgPageFormsEDSettings":null,"wgAmericanDates":false,"wgMFDisplayWikibaseDescriptions":{"search":false,"nearby":false,"watchlist":false,"tagline":false},"wgVector2022PreviewPages":[]};RLSTATE={"site.styles":"ready","user.styles":"ready","user":"ready","user.options":"loading","skins.vector.styles.legacy":"ready"};RLPAGEMODULES=["site","mediawiki.page.ready","mediawiki.toc","skins.vector.legacy.js","ext.Bugzilla"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.implement("user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"});});});</script> <link rel="stylesheet" href="/load.php?lang=en&amp;modules=skins.vector.styles.legacy&amp;only=styles&amp;skin=vector"/> <script async="" src="/load.php?lang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector"></script> <meta name="ResourceLoaderDynamicStyles" content=""/> <link rel="stylesheet" href="/load.php?lang=en&amp;modules=site.styles&amp;only=styles&amp;skin=vector"/> <meta name="generator" content="MediaWiki 1.39.10"/> <meta name="format-detection" content="telephone=no"/> <meta name="viewport" content="width=1000"/> <link rel="icon" href="/images/favicon.ico"/> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch_desc.php" title="MozillaWiki (en)"/> <link rel="EditURI" type="application/rsd+xml" href="https://wiki.mozilla.org/api.php?action=rsd"/> <link rel="alternate" type="application/atom+xml" title="MozillaWiki Atom feed" href="/index.php?title=Special:RecentChanges&amp;feed=atom"/> </head> <body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-122 ns-subject page-Bugzilla_L10n_Guide rootpage-Bugzilla_L10n_Guide skin-vector action-view skin-vector-legacy vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-language-alert-in-sidebar-disabled vector-feature-sticky-header-disabled vector-feature-sticky-header-edit-disabled vector-feature-table-of-contents-disabled vector-feature-visual-enhancement-next-disabled"><div id="mw-page-base" class="noprint"></div> <div id="mw-head-base" class="noprint"></div> <div id="content" class="mw-body" role="main"> <a id="top"></a> <div id="siteNotice"></div> <div class="mw-indicators"> </div> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-namespace">Bugzilla</span><span class="mw-page-title-separator">:</span><span class="mw-page-title-main">L10n:Guide</span></h1> <div id="bodyContent" class="vector-body"> <div id="siteSub" class="noprint">From MozillaWiki</div> <div id="contentSub"></div> <div id="contentSub2"></div> <div id="jump-to-nav"></div> <a class="mw-jump-link" href="#mw-head">Jump to navigation</a> <a class="mw-jump-link" href="#searchInput">Jump to search</a> <div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-parser-output"><div style="padding: 1em; border: solid 1px #D7D3C8; background: #F6F4EC; font-size: 1.1em; line-height: 1.6em"><a href="/File:Nuvola_apps_important.png" class="image" title="Warning sign"><img alt="Warning sign" src="/images/thumb/6/62/Nuvola_apps_important.png/35px-Nuvola_apps_important.png" decoding="async" width="35" height="31" style="vertical-align: middle" srcset="/images/thumb/6/62/Nuvola_apps_important.png/53px-Nuvola_apps_important.png 1.5x, /images/thumb/6/62/Nuvola_apps_important.png/70px-Nuvola_apps_important.png 2x" /></a><span style="padding-left: 15px;"><b>Warning:</b> The best documentation on how to localize Bugzilla is currently <a rel="nofollow" class="external text" href="http://www.bugzilla.fr/docs/makedoc.html">here</a>. The below historical information may be out of date.</span></div> <div id="toc" class="toc" role="navigation" aria-labelledby="mw-toc-heading"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2 id="mw-toc-heading">Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div> <ul> <li class="toclevel-1 tocsection-1"><a href="#Overview"><span class="tocnumber">1</span> <span class="toctext">Overview</span></a></li> <li class="toclevel-1 tocsection-2"><a href="#Getting_Started"><span class="tocnumber">2</span> <span class="toctext">Getting Started</span></a> <ul> <li class="toclevel-2 tocsection-3"><a href="#Obtaining_The_Source_Files"><span class="tocnumber">2.1</span> <span class="toctext">Obtaining The Source Files</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-4"><a href="#The_task"><span class="tocnumber">3</span> <span class="toctext">The task</span></a> <ul> <li class="toclevel-2 tocsection-5"><a href="#Terminology"><span class="tocnumber">3.1</span> <span class="toctext">Terminology</span></a></li> <li class="toclevel-2 tocsection-6"><a href="#Localizing_Templates"><span class="tocnumber">3.2</span> <span class="toctext">Localizing Templates</span></a> <ul> <li class="toclevel-3 tocsection-7"><a href="#Hardcoded_strings"><span class="tocnumber">3.2.1</span> <span class="toctext">Hardcoded strings</span></a></li> <li class="toclevel-3 tocsection-8"><a href="#Caveats"><span class="tocnumber">3.2.2</span> <span class="toctext">Caveats</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-9"><a href="#Test"><span class="tocnumber">3.3</span> <span class="toctext">Test</span></a></li> <li class="toclevel-2 tocsection-10"><a href="#Release"><span class="tocnumber">3.4</span> <span class="toctext">Release</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-11"><a href="#Resources"><span class="tocnumber">4</span> <span class="toctext">Resources</span></a> <ul> <li class="toclevel-2 tocsection-12"><a href="#Current_active_locales_and_maintainers"><span class="tocnumber">4.1</span> <span class="toctext">Current active locales and maintainers</span></a></li> <li class="toclevel-2 tocsection-13"><a href="#Tools"><span class="tocnumber">4.2</span> <span class="toctext">Tools</span></a></li> </ul> </li> </ul> </div> <h2><span class="mw-headline" id="Overview">Overview</span></h2> <p>This guide provides new localizers a step by step howto to localize Bugzilla in their own locale. </p><p>It also contains useful resources links to get the contribution done and to keep the localization up-to-date. </p> <h2><span class="mw-headline" id="Getting_Started">Getting Started</span></h2> <p>You should first look if somebody else is already working on localizing Bugzilla in your locale.<br /> <a rel="nofollow" class="external text" href="http://www.bugzilla.org/download/#localizations">This page</a> shows all the localized Bugzilla releases we aware of. If you cannot find the version of Bugzilla you want to localize on this page, that doesn't mean that this version is not currently handled. So, please contact the current maintainer or team to avoid duplicated effort. Current active locales can be found in <a href="/Bugzilla:L10n:Guide#Resources" title="Bugzilla:L10n:Guide">this section</a>.<br /> Once you are sure that nobody is already working on your locale or when you have coordinated with the current team/owner, you can start with the localization. </p> <h3><span class="mw-headline" id="Obtaining_The_Source_Files">Obtaining The Source Files</span></h3> <p>Unless you are sure about the release you want to localize, we advise you to start with the latest stable version. See the <a rel="nofollow" class="external text" href="http://www.bugzilla.org/releases/">Release page</a> to see the latest version and to download the tar.gz archive.<br /> Uncompress the tarball with your favorite tool in an empty directory.<br /> You should have the following tree structure (note: all subdirectories and files are not detailed here):<br /> </p> <pre>bugzilla-X.Y.Z (where X.Y.Z are the numbers for the release) --Bugzilla --contrib --docs | --lib | --pdf | --txt | --xml | --html | --images | --images --js --skins --t --templates | --en | --default | --extensions .UPGRADING .UPGRADING-pre-2.8 </pre> <p>The localizable contents are located under the following directories:<br /> docs/xml<br /> templates/en<br /> The files UPGRADING and UPGRADING-pre-2.8 are also localizable.<br /> </p><p>You should focus first on the /templates directory, which contains all the files used to build the user interface.<br /> First, remove all the /CVS subdirectories under the /templates directory:<br /> </p> <dl><dt>GNU/Linux &amp; Mac OSX</dt></dl> <pre>$cd templates $rm -rf `find . -name CVS` </pre> <dl><dt>Windows</dt></dl> <pre>C:\bugzilla-X.Y.Z&gt;cd templates C:\bugzilla-X.Y.Z&gt;FOR /D %i IN (CVS) DO (rmdir /s/q %i) </pre> <p>Then, you should rename the /en subdirectory for your locale name.<br /> For instance, you can use <i>fr</i> for French or <i>ca</i> for Catalan.<br /> You can also use a four-letter locale code:<br /> For instance, <i>pt-BR</i> for Brazilian Portuguese or <i>zh-CN</i> for Chinese (Simplified).<br /> See page <a href="/L10n:Simple_locale_names" class="mw-redirect" title="L10n:Simple locale names">L10n:Simple_locale_names</a> for the locale code that best fit for your locale. </p> <h2><span class="mw-headline" id="The_task">The task</span></h2> <h3><span class="mw-headline" id="Terminology">Terminology</span></h3> <p>Before translating your first template, you should establish a terminology for Bugzilla specific terms. Make sure you always use the same translation for a given term. This is especially important when you have a team of translators. </p><p>For instance, start thinking about translations of some of these tricky terms: </p> <ul><li><b>Whine</b> / <b>Whining</b></li> <li><b>Requestee</b></li> <li><b>Flag</b> / <b>Flag status</b></li> <li><b>Target milestone</b></li></ul> <p>Some terms are pretty close in their dictionary (not Bugzilla) meanings. Obvious solution in one case may lead to conflicts later. Consider these examples: </p> <ul><li><b>Bug</b> (database object, default value for <i>terms.bug</i>) and <b>error</b> (in Bugzilla application itself).</li> <li><b>Bug report</b> (to be created by user) and <b>report</b> (database statistics).</li> <li><b>Message</b> (as in <i>global/messages.html.tmpl</i>) and <b>whine</b> (reminder email message).</li></ul> <p>English Bugzilla commonly uses <b>Bug</b> while meaning <b>Bug report</b>. This has implications in verb usage. Essentially user does not 'create a bug' -- it already exists elsewhere, and one can only register it in Bugzilla database. </p><p>Important: do not rely on <i>terms.bug</i> being equal to <b>Bug</b>. Beyond its original purpose of bug tracking, Bugzilla is widely used in other applications. Always read translated phrases again and try to apply other terms: <b>Problem</b>, <b>Request</b>, <b>Defect</b> or <b>Service call</b>. If your language uses grammatic gender, you will reject many phrases which sound well with <b>Bug</b>. </p><p>Create and maintain a dictionary of Bugzilla terms in your language. Here are some examples, listing a number of terms to consider: </p> <ul><li><a rel="nofollow" class="external text" href="http://bugzilla-ru.svn.sourceforge.net/viewvc/*checkout*/bugzilla-ru/bugzilla-ru/help/ru/glossary.html">Russian</a></li></ul> <h3><span class="mw-headline" id="Localizing_Templates">Localizing Templates</span></h3> <p>The template files are identified by the extension <i>.tmpl</i>. The are generated with Template Toolkit.<br /> Currently, these templates contain code and localizable strings mixed together that makes the localization of Bugzilla a bit difficult: what is to be localized and what is not?<br /> </p> <pre>IMPORTANT: Use an UTF8 compliant editor like Gedit, Kate or Emacs under GNU/Linux systems or Notepad++ under Windows systems and localize the templates using UTF8 encoding. </pre> <p>Here are some examples to help you localizing the right stuff:<br /> A good idea is to start with the localization of <i>/template/en/default/global/variables.none.tmpl</i>. This file contains several terms that will be substituted all around the templates files. You can see in this file lines like these:<br /> </p> <pre>[%# 1.0@bugzilla.org&#160;%] [%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file </pre> <p>DO NOT translate text located after the character <i>#</i>: the text located after this character is comment. </p> <pre>[% terms = { "bug" =&gt; "bug", "Bug" =&gt; "Bug", "abug" =&gt; "a bug", "Abug" =&gt; "A bug", "ABug" =&gt; "A Bug", "bugs" =&gt; "bugs", "Bugs" =&gt; "Bugs", "zeroSearchResults" =&gt; "Zarro Boogs found", "bit" =&gt; "bit", "bits" =&gt; "bits", "Bugzilla" =&gt; "Bugzilla" } %] </pre> <p>DO NOT translate <i>terms</i> here. What is to be translated here, is the word after <i>=&gt;</i>.<br /> For instance:<br /> </p> <pre> "Bug" =&gt; "Bogue", </pre> <p>These terms will be used in the templates. Whenever you see expressions like <i>$terms.ABug</i> or <i>$terms.bugs</i> in templates, they will be replaced in the user interface with the value you put in this file.<br /> </p><p>Another file that is use by several templates is <i>/template/en/default/global/field-descs.none.tmpl</i>. You can see there lines like these:<br /> </p> <pre>[% PROCESS global/variables.none.tmpl&#160;%] [% field_descs = { "[Bug creation]" =&gt; "[$terms.Bug creation]", "actual_time" =&gt; "Actual Hours" "alias" =&gt; "Alias", "assigned_to" =&gt; "Assignee", ...... [% USE Bugzilla&#160;%] [% FOREACH bz_field = Bugzilla.get_fields()&#160;%] [% SET field_descs.${bz_field.name} = bz_field.description IF !field_descs.${bz_field.name}.defined&#160;%] [% END&#160;%] </pre> <p>DO NOT translate here <i>PROCESS</i> or <i>USE</i>. As a general rule, never translate capitalized words enclosed between <i>[% and&#160;%]</i>.<br /> As previoulsly, translate the word after the <i>=&gt;</i>.<br /> </p> <pre>[% PROCESS global/variables.none.tmpl&#160;%] [% field_descs = { "[Bug creation]" =&gt; "[Date de cr茅ation du $terms.bug]", "actual_time" =&gt; "Heures actuelles" "alias" =&gt; "Alias", "assigned_to" =&gt; "Responsable", ...... [% USE Bugzilla&#160;%] [% FOREACH bz_field = Bugzilla.get_fields()&#160;%] [% SET field_descs.${bz_field.name} = bz_field.description IF !field_descs.${bz_field.name}.defined&#160;%] [% END&#160;%] </pre> <p>Now, you can start translating the other templates. Some other examples of what need to be translated:<br /> </p> <pre>[% title = BLOCK&#160;%]Delete Component '[% comp.name FILTER html&#160;%]' of Product '[% product.name FILTER html&#160;%]' [% END&#160;%] [% PROCESS global/header.html.tmpl title = title %] &lt;table border="1" cellpadding="4" cellspacing="0"&gt; &lt;tr bgcolor="#6666FF"&gt; &lt;th valign="top" align="left"&gt;Field&lt;/th&gt; &lt;th valign="top" align="left"&gt;Value&lt;/th&gt; &lt;/tr&gt; </pre> <p>Localized example:<br /> </p> <pre>[% title = BLOCK&#160;%]Suppression du composant 芦&#160;[% comp.name FILTER html&#160;%]&#160;禄 du produit 芦&#160;[% product.name FILTER html&#160;%]&#160;禄 [% END&#160;%] [% PROCESS global/header.html.tmpl title = title %] &lt;table border="1" cellpadding="4" cellspacing="0"&gt; &lt;tr bgcolor="#6666FF"&gt; &lt;th valign="top" align="left"&gt;Champ&lt;/th&gt; &lt;th valign="top" align="left"&gt;Valeur&lt;/th&gt; &lt;/tr&gt; </pre> <p>You will encounter many buttons you will want to localize. These are looking like this: </p> <pre> &lt;input type="submit" id="create" value="Add"&gt; &lt;input type="hidden" name="action" value="new"&gt; &lt;input type="hidden" name='product' value="[% product.name FILTER html&#160;%]"&gt; &lt;input type="hidden" name="token" value="[% token FILTER html&#160;%]"&gt; </pre> <p>Whenever you see this, the only line that needs to be localize is the one with <tt>type="submit"</tt>. DO NOT translate lines with <tt>type="hidden"</tt>: </p> <pre> &lt;input type="submit" id="create" value="Ajouter"&gt; &lt;input type="hidden" name="action" value="new"&gt; &lt;input type="hidden" name='product' value="[% product.name FILTER html&#160;%]"&gt; &lt;input type="hidden" name="token" value="[% token FILTER html&#160;%]"&gt; </pre> <p>Other common lines through the templates are text enclosed between an opening and a closing tag: </p> <pre>&lt;td valign="top"&gt;Description du produit&#160;:&lt;/td&gt; &lt;TD VALIGN="top"&gt;[% IF product.disallow_new&#160;%]Oui[% ELSE&#160;%]Non[% END&#160;%]&lt;/td&gt; &lt;a title="Liste des [% terms.bugs&#160;%] pour le composant 芦&#160;[% comp.name FILTER html&#160;%]&#160;禄" href="buglist.cgi?component=[% comp.name FILTER url_quote&#160;%]&amp;product= [%- product.name FILTER url_quote&#160;%]"&gt;[% comp.bug_count&#160;%]&lt;/a&gt; </pre> <p>If you have doubts, you can take a look at other working locales. Though they might have some errors left, they are working and noone reported bugs at the moment about localization&#160;: </p><p><a rel="nofollow" class="external text" href="http://frenchmozilla.cvs.sourceforge.net/frenchmozilla/bugzilla/">French 3.1.x Bugzilla series</a> </p><p><a rel="nofollow" class="external text" href="http://frenchmozilla.cvs.sourceforge.net/frenchmozilla/bugzilla/?pathrev=BZ_3_0_BRANCH">French 3.0.x Bugzilla series</a> </p><p>... </p><p>TBD&#160;: add other tricky examples; some examples should be in non-Latin alphabet to popup clearly. Add other links towards working locales. </p> <h4><span class="mw-headline" id="Hardcoded_strings">Hardcoded strings</span></h4> <p>TBD </p> <h4><span class="mw-headline" id="Caveats">Caveats</span></h4> <p><strong>[%&#160;%] and [%+&#160;%]</strong><br /> Generally, you should follow the English model, but if you need to change the order of [%&#160;%] in a line, you should be aware of those rules:<br /> When two [%&#160;%] members are following each other, the second member won't be separated with a space from the first one, even if you separate them with a space: </p> <pre> [% ELSIF message_tag == "bug_duplicate_of"&#160;%] This [% terms.bug&#160;%] has been marked as a duplicate of [% terms.bug&#160;%] [% dupe_of FILTER html&#160;%] </pre> <p>For instance, the previous line of code will display in the browser as:<br /> </p> <pre>This bug has been marked as duplicate of bug12345 </pre> <p>Instead you should add a "+" sign in the second member: </p> <pre> [% ELSIF message_tag == "bug_duplicate_of"&#160;%] This [% terms.bug&#160;%] has been marked as a duplicate of [% terms.bug&#160;%] [%+ dupe_of FILTER html&#160;%] </pre> <p>Will then be displayed as: </p> <pre>This bug has been marked as duplicate of bug 12345 </pre> <p>This is the same when a [%&#160;%] member is at the beginning of a new line: </p> <pre> [% IF groups_added_to.size&#160;%] &lt;li&gt; The account has been added to the [% groups_added_to.join(', ') FILTER html&#160;%] group[% 's' IF groups_added_to.size &gt; 1&#160;%]. &lt;/li&gt; [% END&#160;%] </pre> <p>The previous code will be shown as: </p> <pre>The account has been added to thebz_sudo_protect group. </pre> <p>You should instead put a "+" sign: </p> <pre> [% IF groups_added_to.size&#160;%] &lt;li&gt; The account has been added to the [%+ groups_added_to.join(', ') FILTER html&#160;%] group[% 's' IF groups_added_to.size &gt; 1&#160;%]. &lt;/li&gt; [% END&#160;%] </pre> <p>So that the sentence is displayed as: </p> <pre>The account has been added to thebz_sudo_protect group. </pre> <p><strong>Double quotes and single quotes</strong><br /> You should take care of the usage of the quotes in certain cases.<br /> You shouldn't put quotes inside a pair of quotes. The following example will broke the user interface: </p> <pre> [% ELSIF message_tag == "buglist_adding_field"&#160;%] [% title = "Adding field to search page..."&#160;%] [% link = "Click here if the page "does not" redisplay automatically."&#160;%] </pre> <p>Instead, you can escape them with a backslash ("\"): </p> <pre> [% ELSIF message_tag == "buglist_adding_field"&#160;%] [% title = "Adding field to search page..."&#160;%] [% link = "Click here if the page \"does not\" redisplay automatically."&#160;%] </pre> <p>Or you can substitute the surrounding double quotes with single quotes: </p> <pre> [% ELSIF message_tag == "buglist_adding_field"&#160;%] [% title = "Adding field to search page..."&#160;%] [% link = 'Click here if the page "does not" redisplay automatically.'&#160;%] </pre> <p><br /> <strong>${terms.bugs} , [% terms.bugs&#160;%] and $terms.bugs</strong> </p><p><strong>Declensions</strong><br /> English only deals with one plural form and has no declension. Your locale might need to implement declensions and reorder words inside a sentence. WARNING: this is a bit tricky and making mistake here will broke your Bugzilla localization (i.e. some features might not function when your locale package will be installed).<br /> Let's say we have the following: </p> <pre> [% IF !Param("allowbugdeletion")&#160;%] &lt;p&gt; Sorry, there [% IF comp.bug_count &gt; 1&#160;%] are [% comp.bug_count&#160;%] [%+ terms.bugs&#160;%] [% ELSE&#160;%] is [% comp.bug_count&#160;%] [%+ terms.bug&#160;%] [% END&#160;%] pending for this component. You should reassign [% IF comp.bug_count &gt; 1&#160;%] these [% terms.bugs&#160;%] [% ELSE&#160;%] this [% terms.bug&#160;%] [% END&#160;%] to another component before deleting this component. &lt;/p&gt; [% ELSE&#160;%] </pre> <p>Here, the following expression <tt>comp.bug_count</tt> obviously gives the count number of bugs for a component. <tt>IF comp.bug_count &gt; 1</tt> means "if there are more than one bug".<br /> Let's say your language has to deal with three plural forms and that the terms "bug" and "pending" should be declensed as well.<br /> First, you'll have to populate the <tt>/template/en/default/global/variables.none.tmp</tt> file with the declensions for "bug", which would give something like: </p> <pre>[% terms = { "bug0" =&gt; "declension for zero bug", "bug" =&gt; "declension for one bug", "bug2" =&gt; "declension for two bugs", "bug3" =&gt; "declension for three bugs", "bugs" =&gt; "declension for more than three bugs", </pre> <p>Then, the previous code should look like: </p> <pre> [% IF !Param("allowbugdeletion")&#160;%] &lt;p&gt; Sorry, there [% IF comp.bug_count &gt; 3&#160;%] are [% comp.bug_count&#160;%] pending [% terms.bugs&#160;%] [% ELSE&#160;%] [% IF comp.bug_count == 0&#160;%] is [% comp.bug_count&#160;%] pending [% terms.bug0&#160;%] [% ELSE&#160;%] [% IF comp.bug_count == 1&#160;%] is [% comp.bug_count&#160;%] pending [% terms.bug&#160;%] [% ELSE&#160;%] [% IF comp.bug_count == 2&#160;%] are [% comp.bug_count&#160;%] pending [% terms.bug2&#160;%] [% ELSE&#160;%] [% IF comp.bug_count == 3&#160;%] is [% comp.bug_count&#160;%] pending [% terms.bug3&#160;%] [% END&#160;%] for this component. You should reassign [% IF comp.bug_count &gt; 1&#160;%] these [% terms.bugs&#160;%] [% ELSE&#160;%] this [% terms.bug&#160;%] [% END&#160;%] to another component before deleting this component. &lt;/p&gt; [% ELSE&#160;%] </pre> <h3><span class="mw-headline" id="Test">Test</span></h3> <h3><span class="mw-headline" id="Release">Release</span></h3> <h2><span class="mw-headline" id="Resources">Resources</span></h2> <h3><span class="mw-headline" id="Current_active_locales_and_maintainers">Current active locales and maintainers</span></h3> <p>Moved to <a href="/Bugzilla:L10n:Localization_Teams" title="Bugzilla:L10n:Localization Teams">Bugzilla:L10n:Localization_Teams</a> </p> <h3><span class="mw-headline" id="Tools">Tools</span></h3> <dl><dt><a rel="nofollow" class="external text" href="http://winmerge.org/">WinMerge</a></dt> <dd><i>WinMerge</i> is an Open Source visual text file differencing and merging tool for Win32 platforms. With full UTF-8 support, it is highly useful for determing what has changed between project versions, and then merging changes between versions.</dd> <dt><a rel="nofollow" class="external text" href="http://www.xemacs.org/Documentation/packages/html/ediff.html">Ediff</a></dt> <dd><i>Ediff</i> is a <a rel="nofollow" class="external text" href="http://www.gnu.org/software/emacs/">GNU Emacs</a> major mode. Ediff provides a convenient way for simultaneous browsing through the differences between a pair (or a triple) of files.</dd></dl> <!-- NewPP limit report Cached time: 20250224201718 Cache expiry: 86400 Reduced expiry: false Complications: [show鈥恡oc] CPU time usage: 0.021 seconds Real time usage: 0.036 seconds Preprocessor visited node count: 228/1000000 Post鈥恊xpand include size: 416/2097152 bytes Template argument size: 165/2097152 bytes Highest expansion depth: 3/100 Expensive parser function count: 0/100 Unstrip recursion depth: 0/20 Unstrip post鈥恊xpand size: 7402/5000000 bytes --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 8.387 1 Template:Warning 100.00% 8.387 1 -total 32.31% 2.710 1 Template:Color/Mozilla/sand 30.95% 2.596 1 Template:Color/Mozilla/sand_start --> <!-- Saved in parser cache with key wiki:pcache:idhash:22666-0!canonical and timestamp 20250224201718 and revision id 1096895. --> </div> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://wiki.mozilla.org/index.php?title=Bugzilla:L10n:Guide&amp;oldid=1096895">https://wiki.mozilla.org/index.php?title=Bugzilla:L10n:Guide&amp;oldid=1096895</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/Special:Categories" title="Special:Categories">Categories</a>: <ul><li><a href="/Category:Bugzilla" title="Category:Bugzilla">Bugzilla</a></li><li><a href="/Category:L10n" title="Category:L10n">L10n</a></li></ul></div></div> </div> </div> <div id="mw-navigation"> <h2>Navigation menu</h2> <div id="mw-head"> <nav id="p-personal" class="vector-menu mw-portlet mw-portlet-personal vector-user-menu-legacy" aria-labelledby="p-personal-label" role="navigation" > <h3 id="p-personal-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Personal tools</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="pt-login" class="mw-list-item"><a href="/index.php?title=Special:UserLogin&amp;returnto=Bugzilla%3AL10n%3AGuide" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o"><span>Log in</span></a></li><li id="pt-createaccount" class="mw-list-item"><a href="/Special:RequestAccount" title="You are encouraged to create an account and log in; however, it is not mandatory"><span>Request account</span></a></li></ul> </div> </nav> <div id="left-navigation"> <nav id="p-namespaces" class="vector-menu mw-portlet mw-portlet-namespaces vector-menu-tabs vector-menu-tabs-legacy" aria-labelledby="p-namespaces-label" role="navigation" > <h3 id="p-namespaces-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Namespaces</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="ca-nstab-bugzilla" class="selected mw-list-item"><a href="/Bugzilla:L10n:Guide"><span>Bugzilla</span></a></li><li id="ca-talk" class="mw-list-item"><a href="/Bugzilla_Talk:L10n:Guide" rel="discussion" title="Discussion about the content page [t]" accesskey="t"><span>Discussion</span></a></li></ul> </div> </nav> <nav id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet vector-menu-dropdown" aria-labelledby="p-variants-label" role="navigation" > <input type="checkbox" id="p-variants-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-variants" class="vector-menu-checkbox" aria-labelledby="p-variants-label" /> <label id="p-variants-label" aria-label="Change language variant" class="vector-menu-heading " > <span class="vector-menu-heading-label">English</span> </label> <div class="vector-menu-content"> <ul class="vector-menu-content-list"></ul> </div> </nav> </div> <div id="right-navigation"> <nav id="p-views" class="vector-menu mw-portlet mw-portlet-views vector-menu-tabs vector-menu-tabs-legacy" aria-labelledby="p-views-label" role="navigation" > <h3 id="p-views-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Views</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="ca-view" class="selected mw-list-item"><a href="/Bugzilla:L10n:Guide"><span>Read</span></a></li><li id="ca-viewsource" class="mw-list-item"><a href="/index.php?title=Bugzilla:L10n:Guide&amp;action=edit" title="This page is protected.&#10;You can view its source [e]" accesskey="e"><span>View source</span></a></li><li id="ca-history" class="mw-list-item"><a href="/index.php?title=Bugzilla:L10n:Guide&amp;action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li></ul> </div> </nav> <nav id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-menu-dropdown" aria-labelledby="p-cactions-label" role="navigation" title="More options" > <input type="checkbox" id="p-cactions-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-cactions" class="vector-menu-checkbox" aria-labelledby="p-cactions-label" /> <label id="p-cactions-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">More</span> </label> <div class="vector-menu-content"> <ul class="vector-menu-content-list"></ul> </div> </nav> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <div> <h3 > <label for="searchInput">Search</label> </h3> <form action="/index.php" id="searchform" class="vector-search-box-form"> <div id="simpleSearch" class="vector-search-box-inner" data-search-loc="header-navigation"> <input class="vector-search-box-input" type="search" name="search" placeholder="Search MozillaWiki" aria-label="Search MozillaWiki" autocapitalize="sentences" title="Search MozillaWiki [f]" accesskey="f" id="searchInput" > <input type="hidden" name="title" value="Special:Search"> <input id="mw-searchButton" class="searchButton mw-fallbackSearchButton" type="submit" name="fulltext" title="Search the pages for this text" value="Search"> <input id="searchButton" class="searchButton" type="submit" name="go" title="Go to a page with this exact name if it exists" value="Go"> </div> </form> </div> </div> </div> </div> <div id="mw-panel"> <div id="p-logo" role="banner"> <a class="mw-wiki-logo" href="/Main_Page" title="Visit the main page"></a> </div> <nav id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation vector-menu-portal portal" aria-labelledby="p-navigation-label" role="navigation" > <h3 id="p-navigation-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Navigation</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="n-mainpage-description" class="mw-list-item"><a href="/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-Product-releases" class="mw-list-item"><a href="/Releases"><span>Product releases</span></a></li><li id="n-newpages" class="mw-list-item"><a href="/Special:NewPages"><span>New pages</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-Recent-uploads" class="mw-list-item"><a href="/Special:NewFiles"><span>Recent uploads</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/Special:Random" title="Load a random page [x]" accesskey="x"><span>Random page</span></a></li><li id="n-Help" class="mw-list-item"><a href="/MozillaWiki:Help" title="The place to find out"><span>Help</span></a></li></ul> </div> </nav> <nav id="p-How_to_Contribute" class="vector-menu mw-portlet mw-portlet-How_to_Contribute vector-menu-portal portal" aria-labelledby="p-How_to_Contribute-label" role="navigation" > <h3 id="p-How_to_Contribute-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">How to Contribute</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="n-All-hands-meeting" class="mw-list-item"><a href="/WeeklyUpdates"><span>All-hands meeting</span></a></li><li id="n-Other-meetings" class="mw-list-item"><a href="/Community_Calendar"><span>Other meetings</span></a></li><li id="n-Contribute-to-Mozilla" class="mw-list-item"><a href="/Contribute"><span>Contribute to Mozilla</span></a></li><li id="n-Community-Portal" class="mw-list-item"><a href="//community.mozilla.org" rel="nofollow"><span>Community Portal</span></a></li><li id="n-Community-Participation-Guidelines" class="mw-list-item"><a href="//www.mozilla.org/en-US/about/governance/policies/participation/" rel="nofollow"><span>Community Participation Guidelines</span></a></li></ul> </div> </nav> <nav id="p-MozillaWiki" class="vector-menu mw-portlet mw-portlet-MozillaWiki vector-menu-portal portal" aria-labelledby="p-MozillaWiki-label" role="navigation" > <h3 id="p-MozillaWiki-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">MozillaWiki</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="n-About" class="mw-list-item"><a href="/MozillaWiki:About"><span>About</span></a></li><li id="n-Team" class="mw-list-item"><a href="/MozillaWiki:Team"><span>Team</span></a></li><li id="n-Policies" class="mw-list-item"><a href="/MozillaWiki:Policies"><span>Policies</span></a></li><li id="n-Report-a-wiki-bug" class="mw-list-item"><a href="//bugzilla.mozilla.org/enter_bug.cgi?product=Websites&amp;component=wiki.mozilla.org" rel="nofollow"><span>Report a wiki bug</span></a></li></ul> </div> </nav> <nav id="p-Around_Mozilla" class="vector-menu mw-portlet mw-portlet-Around_Mozilla vector-menu-portal portal" aria-labelledby="p-Around_Mozilla-label" role="navigation" > <h3 id="p-Around_Mozilla-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Around Mozilla</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="n-Mozilla-Support" class="mw-list-item"><a href="//support.mozilla.org/" rel="nofollow"><span>Mozilla Support</span></a></li><li id="n-Mozilla-Developer-Network" class="mw-list-item"><a href="//developer.mozilla.org/" rel="nofollow"><span>Mozilla Developer Network</span></a></li><li id="n-Planet-Mozilla" class="mw-list-item"><a href="//planet.mozilla.org/" rel="nofollow"><span>Planet Mozilla</span></a></li><li id="n-Mozilla-Blog" class="mw-list-item"><a href="//blog.mozilla.org/" rel="nofollow"><span>Mozilla Blog</span></a></li><li id="n-Research" class="mw-list-item"><a href="//www.mozilla.org/research/" rel="nofollow"><span>Research</span></a></li></ul> </div> </nav> <nav id="p-tb" class="vector-menu mw-portlet mw-portlet-tb vector-menu-portal portal" aria-labelledby="p-tb-label" role="navigation" > <h3 id="p-tb-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Tools</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"><li id="t-whatlinkshere" class="mw-list-item"><a href="/Special:WhatLinksHere/Bugzilla:L10n:Guide" title="A list of all wiki pages that link here [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/Special:RecentChangesLinked/Bugzilla:L10n:Guide" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-print" class="mw-list-item"><a href="javascript:print();" rel="alternate" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/index.php?title=Bugzilla:L10n:Guide&amp;oldid=1096895" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/index.php?title=Bugzilla:L10n:Guide&amp;action=info" title="More information about this page"><span>Page information</span></a></li></ul> </div> </nav> </div> </div> <footer id="footer" class="mw-footer" role="contentinfo" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 23 September 2015, at 13:23.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="/MozillaWiki:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/MozillaWiki:About">About MozillaWiki</a></li> <li id="footer-places-mobileview"><a href="https://wiki.mozilla.org/index.php?title=Bugzilla:L10n:Guide&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/"><img src="/resources/assets/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" srcset="/resources/assets/poweredby_mediawiki_132x47.png 1.5x, /resources/assets/poweredby_mediawiki_176x62.png 2x" width="88" height="31" loading="lazy"/></a></li> </ul> </footer> <script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgPageParseReport":{"limitreport":{"cputime":"0.021","walltime":"0.036","ppvisitednodes":{"value":228,"limit":1000000},"postexpandincludesize":{"value":416,"limit":2097152},"templateargumentsize":{"value":165,"limit":2097152},"expansiondepth":{"value":3,"limit":100},"expensivefunctioncount":{"value":0,"limit":100},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":7402,"limit":5000000},"timingprofile":["100.00% 8.387 1 Template:Warning","100.00% 8.387 1 -total"," 32.31% 2.710 1 Template:Color/Mozilla/sand"," 30.95% 2.596 1 Template:Color/Mozilla/sand_start"]},"cachereport":{"timestamp":"20250224201718","ttl":86400,"transientcontent":false}}});mw.config.set({"wgBackendResponseTime":278});});</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10