diff options
Diffstat (limited to 'files/ar/mozilla')
19 files changed, 0 insertions, 1767 deletions
diff --git a/files/ar/mozilla/add-ons/add-on_guidelines/index.html b/files/ar/mozilla/add-ons/add-on_guidelines/index.html deleted file mode 100644 index a2ceecab7b..0000000000 --- a/files/ar/mozilla/add-ons/add-on_guidelines/index.html +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: Add-on guidelines -slug: Mozilla/Add-ons/Add-on_guidelines -translation_of: 'https://extensionworkshop.com/documentation/publish/add-on-policies/' ---- -<p>These add-on guidelines were created to foster an open and diverse add-on developer community while ensuring an excellent user experience. They apply to all add-ons and add-on updates regardless of where they are hosted, and also apply to customizations performed by installers that configure Firefox without using an add-on. Add-ons hosted on <a class="external text" href="https://addons.mozilla.org/" rel="nofollow">AMO</a> are subject to <a href="https://addons.mozilla.org/developers/docs/policies" title="https://addons.mozilla.org/developers/docs/policies">additional policies</a>.</p> -<h2 id="Be_Transparent">Be Transparent</h2> -<ul> - <li>Add-ons must either be installed using the add-on web install system, or be approved by the user using the <a class="external text" href="https://blog.mozilla.org/addons/2011/08/11/strengthening-user-control-of-add-ons/" rel="nofollow">install opt-in dialog</a>. - <ul> - <li>We want our users to know what they are installing so that they are not unpleasantly surprised by changes they did not expect. We also want them to know what to remove if they decide not to keep it.</li> - <li>Add-ons installed through application installers should <a class="external text" href="/en-US/docs/Adding_Extensions_using_the_Windows_Registry" rel="nofollow">use the Windows Registry</a> or equivalent global install methods so that Firefox displays the opt-in screen. The opt-in screen must not be tampered with in any way, including overlaying additional information or images on top of it.</li> - </ul> - </li> - <li>Add-ons must always be possible to uninstall or disable from the Add-ons Manager. - <ul> - <li>Add-ons installed globally using the Windows registry or global extension directories cannot be uninstalled (<a class="external text" href="https://bugzilla.mozilla.org/show_bug.cgi?id=640775" rel="nofollow">bug 640775</a>), but they can be disabled to the same effect.</li> - </ul> - </li> - <li>Add-ons must use a <a class="external text" href="/en-US/docs/Install_manifests#id" rel="nofollow">single unique ID</a> during their entire lifetime. - <ul> - <li>Using the same ID for multiple products, or multiple IDs for a single product, can lead to problems with automatic updates as well as blocklisting conflicts. Add-ons may change their IDs due to ownership changes, as they commonly use an email address-like format ( - <i> - e.g.,</i> - personasplus@mozilla.com).</li> - </ul> - </li> - <li>Add-ons must not use brand names, trademarks, or other terms in ways that deceive users. Using Mozilla trademarks must follow <a class="external text" href="http://www.mozilla.org/foundation/trademarks/policy.html" rel="nofollow">our trademark policy</a>.</li> - <li>Add-ons should clearly communicate their intended purpose and active features, including features introduced through updates. - <ul> - <li>While we understand and support add-on developers who choose to monetize their products, this should not come at the expense of users' browsing experience. If an add-on inserts advertisements, affiliate codes, sponsored search results, or the like, into web pages, the user should be made aware of this when the add-on is installed. Likewise, if some features require payment to use, or require payment to remain active after a trial period, users should be made aware of this.</li> - </ul> - </li> -</ul> -<h2 id="Be_Respectful_to_Users">Be Respectful to Users</h2> -<ul> - <li>Add-ons must remove all introduced code, executables, and application configuration changes when they are uninstalled. - <ul> - <li>Uninstalling an add-on using the regular uninstall process should generally suffice. This guideline primarily applies to changes made to preferences such as the homepage, default search URL, network settings, and so forth. These preferences should be restored to their previous values when the add-on is uninstalled. Most add-ons can easily accomplish this by making such changes via a <a class="external text" href="/en-US/docs/Building_an_Extension#Defaults_Files" rel="nofollow">default preferences file</a>.</li> - </ul> - </li> - <li>Add-ons should respect the users' choices and not make unexpected changes, or limit users' ability to revert them. - <ul> - <li>For instance, users generally do not expect an add-on to change the Firefox homepage. Asking users to opt-in to such extra changes is recommended. Making them difficult or impossible to revert is strongly discouraged.</li> - </ul> - </li> - <li>Add-ons should make it clear how private user data is being used. - <ul> - <li>Add-ons which send user data over the Internet should generally provide a Privacy Policy, ideally concise and easily readable.</li> - </ul> - </li> - <li>Add-on developers should provide a mechanism for them to be contacted. - <ul> - <li>While developers are not required to provide a support channel for users, it is recommended. All add-on developers should have a contact form or public email address so that they can be contacted in case of emergencies, such as guideline violations that could lead to blocklisting.</li> - </ul> - </li> -</ul> -<h2 id="Be_Safe">Be Safe</h2> -<ul> - <li>Add-ons must not cause harm to users' data, system, or online identities.</li> - <li>Add-ons must not transmit users' private data unsafely, or expose it to third parties unnecessarily. - <ul> - <li>Private data should always be sent over a secure connection. This includes browsing data such as visited URLs and bookmarks.</li> - <li>Making the browser easier to fingerprint by adding text to the User-Agent string or adding custom headers is also a privacy concern, and should be avoided.</li> - </ul> - </li> - <li>Add-ons must not create or expose application or system vulnerabilities. - <ul> - <li>Security bugs happen, but once discovered they need to be addressed immediately. A popular add-on with a security vulnerability is a valuable attack vector for hackers, and in such cases we will move quickly to blocklist the add-on if there is no prompt response from the developer.</li> - </ul> - </li> - <li>Add-ons must not tamper with the application or blocklist update systems.</li> - <li>Add-ons should not store any browsing data while in Private Browsing Mode. - <ul> - <li>It's worth stressing that PBM is about avoiding storing - <i> - local</i> - data while browsing, not about sending data elsewhere. To learn more about PBM we recommend reading <a class="external text" href="http://ehsanakhgari.org/tag/privatebrowsing" rel="nofollow">Ehsan's blog posts</a> about it.</li> - </ul> - </li> -</ul> -<h2 id="Be_Stable">Be Stable</h2> -<ul> - <li>Add-ons must not cause hangs or crashes.</li> - <li>Add-ons should not break or disable core application features. - <ul> - <li>This includes features like tabbed browsing, Private Browsing Mode, and the location bar. Add-ons that are specifically meant to do this are exempt.</li> - </ul> - </li> - <li>Add-ons should not cause memory leaks, or unnecessarily consume large amounts of memory.</li> - <li>Add-ons should not slow down the application or system significantly.</li> - <li>Add-ons should not consume network resources to an extent that affects regular application usage. - <ul> - <li>Downloading large amounts of data without user awareness can significantly disrupt regular browsing, and may result in unexpected charges for users who have network usage limitations (notably on mobile).</li> - </ul> - </li> -</ul> -<h2 id="Exceptions">Exceptions</h2> -<ul> - <li>Add-ons can break some of these guidelines if that's their intended purpose and there isn't malicious intent ( - <i> - e.g.,</i> - a security exploit proof of concept).</li> - <li>Add-ons deployed by administrators within workplaces, schools, kiosks, and so forth, are exempt from most guidelines.</li> - <li>As add-ons can only run clean up code if they are uninstalled while Firefox is running and they are enabled, we do not require that they attempt to clean up after themselves when they are uninstalled under other circumstances. Application installers that configure Firefox without add-ons should revert any changes when uninstalled.</li> - <li>Add-ons may leave behind preferences changes in private preference branches which do not affect Firefox when the add-on is not active, so that any previous add-on configuration is not lost if the user decides to re-install the add-on in the future.</li> -</ul> -<p>Other exceptions may apply.</p> -<h2 id="Enforcement">Enforcement</h2> -<p>Add-ons that do not follow these guidelines may qualify for blocklisting, depending on the extent of the violations. Guidelines qualified with the word - <i> - must</i> - are especially important, and violations thereof will most likely result in a blocklisting nomination.</p> -<p>The Add-ons Team will do their best to contact the add-on's developers and provide a reasonable time frame for the problems to be corrected before a block is put in place. If an add-on is considered malicious or its developers have proven unreachable or unresponsive, or in case of repeat violations, blocklisting may be immediate.</p> -<p>Guideline violations should be <a class="external text" href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Tech%20Evangelism&component=Add-ons" rel="nofollow">reported via Bugzilla</a>, under Tech Evangelism > Add-ons. Questions can be posted in the <a class="external text" href="irc://irc.mozilla.org/addons" rel="nofollow">#addons IRC channel</a>.</p> -<p>These guidelines may change in the future. All updates will be announced in the <a class="external text" href="https://blog.mozilla.org/addons/" rel="nofollow">Add-ons Blog</a>.</p> diff --git a/files/ar/mozilla/add-ons/amo/index.html b/files/ar/mozilla/add-ons/amo/index.html deleted file mode 100644 index e1684b2100..0000000000 --- a/files/ar/mozilla/add-ons/amo/index.html +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: AMO -slug: Mozilla/Add-ons/AMO -tags: - - NeedsTranslation - - TopicStub -translation_of: Mozilla/Add-ons/AMO ---- -<p>Pages documenting <a href="https://addons.mozilla.org/en-US/firefox/">addons.mozilla.org</a>:</p> - -<p>{{Listsubpages("/en-US/Add-ons/AMO", 10)}}</p> - -<p> </p> - -<p> </p> diff --git a/files/ar/mozilla/add-ons/amo/policy/index.html b/files/ar/mozilla/add-ons/amo/policy/index.html deleted file mode 100644 index 669d7f8f2d..0000000000 --- a/files/ar/mozilla/add-ons/amo/policy/index.html +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: AMO Policies -slug: Mozilla/Add-ons/AMO/Policy -tags: - - NeedsTranslation - - TopicStub -translation_of: Mozilla/Add-ons/AMO/Policy ---- -<p>{{AddonSidebar}}</p> - -<p>Mozilla is committed to ensuring an excellent experience for both our users and developers of add-ons. Please review the policies below before submitting your add-on.</p> - -<dl> - <dd></dd><dt><a href="/Mozilla/Add-ons/AMO/Policy/Agreement">Developer Agreement</a></dt> -<dd>Effective January 5, 2016</dd> <dt><a href="/Mozilla/Add-ons/AMO/Policy/Reviews">Review Process</a></dt> -<dd>Add-ons extend the core capabilities of Firefox, allowing users to modify and personalize their Web experience. A healthy add-on ecosystem, built on trust, is vital for developers to be successful and users to feel safe making Firefox their own. For these reasons, Mozilla requires all add-ons to comply with the following set of policies on acceptable practices. The below is not intended to serve as legal advice, nor is it intended to serve as a comprehensive list of terms to include in your add-on’s privacy policy.</dd> <dt><a href="/Mozilla/Add-ons/AMO/Policy/Featured">Featured Add-ons</a></dt> -<dd>How up-and-coming add-ons become featured and what's involved in the process. </dd> <strong><a href="/en-US/Add-ons#Contact_us">Contacting us</a></strong> - - <p> How to get in touch with us regarding these policies or your add-on.</p> - -</dl> diff --git a/files/ar/mozilla/add-ons/themes/index.html b/files/ar/mozilla/add-ons/themes/index.html deleted file mode 100644 index 37dd0c7514..0000000000 --- a/files/ar/mozilla/add-ons/themes/index.html +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Themes -slug: Mozilla/Add-ons/Themes -tags: - - Add-ons - - Look & Feel - - NeedsTranslation - - Themes - - TopicStub -translation_of: Mozilla/Add-ons/Themes ---- -<p>{{AddonSidebar}}</p> - -<p>Themes allow you to change the look and feel of the user interface and personalize it to your tastes. Learn how to create and share themes!</p> - -<div class="column-container"> -<div class="column-half"> -<h2 class="Documentation" id="Documentation" name="Documentation">Browser Themes</h2> - -<dl> - <dt><a href="/en-US/docs/Mozilla/Add-ons/Themes/Theme_concepts">Browser theme concepts</a></dt> - <dd>Get an introduction to creating themes for the latest versions of Firefox</dd> -</dl> - -<h2 class="Documentation" id="Documentation" name="Documentation">Lightweight Themes</h2> - -<dl> - <dt><a href="/en-US/docs/Themes/Lightweight_themes" title="Themes/Lightweight themes">Lightweight themes</a></dt> - <dd>Building lightweight themes for Firefox</dd> - <dt><a href="/en-US/Add-ons/Themes/Lightweight_Themes/FAQ">Lightweight themes FAQ</a></dt> - <dd>Get answers to commonly asked questions</dd> -</dl> -</div> - -<div class="column-half"> -<h2 id="Tools_Resources">Tools & Resources</h2> - -<ul> - <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/theme">Browser theme manifest.json keys</a></li> - <li><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/theme">Browser extensions theme API</a></li> - <li><a href="http://vanillaorchidstutorials.blogspot.com/2015/11/mozilla-themes-focal-point-sizing.html">Lightweight themes tutorial</a></li> - <li><a href="https://discourse.mozilla.org/c/add-ons/themes">Discourse forum</a></li> - <li><a href="https://blog.mozilla.org/addons/category/personas/">Theme related blog posts</a></li> - <li><a href="/en-US/Mozilla/Add-ons/Themes/Obsolete">Archived resources</a></li> -</ul> -</div> -</div> - -<p> </p> - -<p> </p> diff --git a/files/ar/mozilla/connect/index.html b/files/ar/mozilla/connect/index.html deleted file mode 100644 index d3b00b5d26..0000000000 --- a/files/ar/mozilla/connect/index.html +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: Connect with Mozilla -slug: Mozilla/Connect -translation_of: Mozilla/Connect ---- -<div class="summary"> -<p><span class="seoSummary">0Enable, inspire and collaborate to make the Web the primary platform used to create experiences across all connected devices.</span></p> -</div> - - -<div> -<div class="column-container dev-program-callouts dev-program-block dev-program-first dev-program-column-wrapper"> -<div class="dev-program-callout"> -<div class="callout-link-container"> -<h2 id="Hacks_blog">Hacks blog</h2> - -<p>A key resource for people developing for the Open Web, the Mozilla Hacks blog offers news and discussion of the latest in Web technologies and browser features.</p> - -<div class="callout-link-wrapper"><a class="callout-link ignore-external" href="https://hacks.mozilla.org/" style="white-space: normal;">Read it now </a></div> -</div> -</div> - -<div class="dev-program-callout"> -<div class="callout-link-container"> -<h2 id="Help_QA">Help Q&A</h2> - -<p>Discuss the Web and Web apps on Stack Overflow, where you can exchange ideas with other Web developers.<br> - <span class="smaller"><strong>{{anch("Developer discussions", "Search the Q&A below")}}</strong></span></p> - -<div class="callout-link-wrapper"><a class="callout-link ignore-external" href="http://stackoverflow.com/r/mozilla" style="white-space: normal;">Mozilla Q&A on Stack Overflow </a></div> -</div> -</div> - -<div class="dev-program-callout"> -<div class="callout-link-container"> -<h2 id="Join_MDN">Join MDN</h2> - -<p>Sign up for MDN! You will able to edit the documentation here, create a profile to show off your work, and get access to features over time as we roll them out.</p> - -<div class="callout-link-wrapper"><a class="callout-link" href="/profile/edit" style="white-space: normal;">Join or log in </a></div> -</div> -</div> -</div> - -<div class="dev-program-explanation dev-program-block"> -<h2 id="Connect_with_Mozilla">Connect with Mozilla</h2> - -<p>Developers are creating the future by building services and apps for people all over the world. The goal of Mozilla Developer Relations is to help developers to use open and standardized web technologies to succeed in achieving their goals. In addition to the documentation here on MDN, we offer help and other resources towards this goal, through various channels. We invite you to connect, learn, and share your own knowledge.</p> - -<p>We are offering help through Q&A on Stack Overflow, to solve specific technical issues and challenges you might have. We also have a newsletter keeping you informed on the latest happenings in the web scene around web apps and more. <a href="https://marketplace.firefox.com/developers/#newsletter-signup">Subscribe to the Apps & Hacks newsletter.</a></p> - -<p>We have a lot of plans and ideas for iteratively expanding our Developer Relations offerings, and we want you involved as we do so! So, <a href="http://stackoverflow.com/r/mozilla">follow the tags on Stack Overflow</a>, <a href="https://hacks.mozilla.org/">subscribe to the Hacks blog</a>, <a href="https://marketplace.firefox.com/developers/#newsletter-signup">subscribe to the newsletter, </a>and <a href="/profile/edit">sign up for an account</a>!</p> -</div> - -<div class="column-container dev-program-block"> -<div class="column-half" id="Developer_discussions"> -<h2 id="QA_on_Stack_Overflow_See_all_QA...">Q&A on Stack Overflow <a class="heading-link" href="http://stackoverflow.com/r/mozilla">See all Q&A...</a></h2> - -<p>We have Q&A to discuss challenges and issues when developing, in particular for Firefox OS and the Open Web on mobile. It's available on Stack Overflow under the easy URL <a href="http://stackoverflow.com/r/mozilla">http://stackoverflow.com/r/mozilla</a>.</p> - - -<div class="stack-form">Stack form</div> - -<h3 id="Latest_QA_Topics">Latest Q&A Topics</h3> -</div> - -<div class="column-half dev-program-hacks dev-program-block"> </div> -</div> - -<p class="dev-program-block"><img alt="Developers at a Firefox OS workshop in Madrid." src="https://mdn.mozillademos.org/files/7479/PhonesUp.jpg" style="display: block; height: 359px; margin: 0px auto; max-width: 100%; width: 720px;"></p> - -<div class="column-container dev-program-block"> -<div class="column-7 dev-program-events"> -<h2 id="Where_is_Mozilla_View_attendees_and_details_on_our_Events_page...">Where is Mozilla? <a class="heading-link" href="https://developer.mozilla.org/en/events">View attendees and details on our Events page... </a></h2> - -<p>Here is a listing of events where Mozilla representatives will be speaking. Make sure to talk to them!</p> -</div> - -<div class="column-5"> -<h2 id="Other_resources">Other resources</h2> - -<ul class="no-bullets"> - <li><a href="http://www.youtube.com/user/mozhacks">Mozilla Hacks on YouTube</a> - - <ul> - <li><a href="http://www.youtube.com/playlist?list=PLo3w8EB99pqIHIUUv08hBCHq1OgPKhdo0">Firefox OS videos</a></li> - <li><a href="http://www.youtube.com/playlist?list=PLo3w8EB99pqLZNY22xKbTEzMfYo9PXAlm">Firefox Developer Tools videos</a></li> - </ul> - </li> - <li><a href="https://twitter.com/mozhacks">@mozhacks on Twitter</a></li> -</ul> -</div> -</div> -</div> - -<p> </p> diff --git a/files/ar/mozilla/firefox_for_android/index.html b/files/ar/mozilla/firefox_for_android/index.html deleted file mode 100644 index 4844391212..0000000000 --- a/files/ar/mozilla/firefox_for_android/index.html +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: Firefox for Android -slug: Mozilla/Firefox_for_Android -translation_of: Mozilla/Firefox_for_Android ---- -<p>For more and more people mobile devices are the primary way, or even the only way, to access the Web.<a class="link-https" href="https://www.mozilla.org/en-US/mobile/"> Firefox for Android</a> (codenamed Fennec) is an open, hackable, standards-based browser, just like the desktop Firefox.</p> -<p>Firefox for Android constructs its user interface from native Android widgets instead of XUL: this greatly improves performance, especially startup time, and memory consumption.</p> -<h2 id="Contribute_to_Firefox_for_Android">Contribute to Firefox for Android</h2> -<p>The main starting point for information about the Firefox for Android project itself is the project <a class="link-https" href="https://wiki.mozilla.org/Mobile/Get_Involved">"Get Involved" page</a>.</p> -<p>You can help us to create and improve Firefox for Android:</p> -<ul> - <li>Help us with <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_for_Android/Compatibility_Testing" title="https://developer-new.mozilla.org/en-US/docs/Mozilla/Firefox_for_Android/Compatibility_Testing">compatibility testing</a></li> - <li>Subscribe to the <a href="https://mail.mozilla.org/listinfo/mobile-firefox-dev">mobile-firefox-dev mailing list</a></li> - <li>Contact the team over <a class="link-irc" href="irc://irc.mozilla.org/#mobile">IRC</a></li> - <li>Join in our <a class="link-https" href="https://wiki.mozilla.org/Mobile/Notes">Wednesday development meeting</a></li> - <li>Keep up to date with project news on <a class="external" href="http://planet.firefox.com/mobile/">Planet Firefox Mobile</a>, <a href="http://fennecnightly.tumblr.com/">Tumblr</a> and <a class="link-https" href="https://twitter.com/FennecNightly" title="https://twitter.com/#!/mozmobile">Twitter</a></li> - <li><a href="https://wiki.mozilla.org/Mobile/Fennec/Android" title="https://wiki.mozilla.org/Mobile/Fennec/Android">Build and hack on Firefox for Android</a> (Fennec)</li> -</ul> -<h2 id="Develop_for_the_mobile_web">Develop for the mobile web</h2> -<p>We've started putting together a guide to <a href="/En/Mobile" title="En/Mobile">designing web sites for mobile devices</a>.</p> -<p>With Firefox for Android, you've got access a number of APIs that expose the underlying capabilities of the device, closing the gap between the Web and native applications:</p> -<ul> - <li><a class="external" href="http://hacks.mozilla.org/2012/02/using-the-battery-api-part-of-webapi/" title="http://hacks.mozilla.org/2012/02/using-the-battery-api-part-of-webapi/">Battery</a></li> - <li><a href="/en/DOM/Using_the_Camera_API" title="Using the Camera API">Camera</a></li> - <li><a href="/en/API/WebTelephony/Introduction_to_WebTelephony" title="Introduction to WebTelephony">WebTelephony</a></li> - <li><a href="/en/API/WebSMS/Introduction_to_WebSMS" title="Introduction to WebSMS">WebSMS</a></li> - <li><a href="/En/Using_geolocation" title="Using geolocation">Geolocation</a></li> - <li><a href="/en/Detecting_device_orientation" title="https://developer.mozilla.org/en/detecting_device_orientation">Orientation</a></li> - <li><a href="/en/WebAPI/Web_Activities" title="Web Activities">Web Activities</a></li> -</ul> -<p>To test your web site on Firefox for Android, you can <a class="link-https" href="https://www.mozilla.org/en-US/mobile/">install it on an Android device</a> or <a class="link-https" href="https://wiki.mozilla.org/Mobile/Fennec/Android/Emulator">run it on your desktop using the Android Emulator</a>.</p> -<h2 id="Build_mobile_add-ons">Build mobile add-ons</h2> -<p><a href="/en/Extensions/Mobile" title="en/Extensions/Firefox_on_Android">Firefox for Android supports add-ons</a> using the exact same <a href="/en/Extensions" title="en/Extensions">extension system</a> used by all other Gecko-based applications. We did not invent a new add-on system. This means that building an add-on for Firefox on Android is the <a href="/en/Building_an_Extension" title="en/Building_an_Extension">same process</a> that would be used for desktop Firefox. Add-ons that work with desktop Firefox <strong>do not</strong> automatically work in Firefox on Android. The user interfaces are just too different.</p> -<div class="note"> - Firefox on Android has a unique application identifier which must be used in <code>install.rdf</code>. The identifier is <code>{aa3c5121-dab2-40e2-81ca-7ea25febc110}</code></div> -<p>Both classic restart-required and newer <a href="/en/Extensions/Bootstrapped_extensions" title="en/Extensions/Bootstrapped_extensions">restartless</a> add-on approaches are supported. Using the restartless approach is preferred whenever possible because the user experience is far superior to forcing an application restart when installing or removing an add-on.</p> -<h3 id="Quick_Overview">Quick Overview</h3> -<ul> - <li>There is no visible XUL in the UI, so using overlays to try to add or change UI is useless.</li> - <li>Internal code and objects, like <code>gBrowser</code>, do not exist. Look at the Firefox on Android <a class="external" href="http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js" title="http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js"><code>browser.js</code></a> file to learn about the internals. Much of the same fundamental functionality exists.</li> - <li>Services like <code>nsIPromptService</code> and <code>nsIAlertsService</code> are implemented to use native Android UI.</li> - <li>There is a simple JavaScript object, called <a href="/en/Extensions/Mobile/API/NativeWindow" title="en/Extensions/Mobile/NativeWindow"><code>NativeWindow</code></a>, that allows you to manipulate parts of the native Android UI.</li> -</ul> -<h2 id="Get_help_with_Firefox_for_Android">Get help with Firefox for Android</h2> -<p>Documentation and tutorials for using and troubleshooting Firefox for Android are available on the <a class="external" href="http://support.mozilla.org/mobile" title="http://support.mozilla.org/mobile">Mozilla Support website</a>.</p> diff --git a/files/ar/mozilla/gecko/index.html b/files/ar/mozilla/gecko/index.html deleted file mode 100644 index ea2c73e891..0000000000 --- a/files/ar/mozilla/gecko/index.html +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: Gecko -slug: Mozilla/Gecko -translation_of: Mozilla/Gecko ---- -<div class="summary"> -<p class="summary"><span class="seoSummary"><strong><font><font><font><font>أبو بريص</font></font></font></font></strong><font><font><font><font> هو اسم محرك تخطيط وضعتها مشروع موزيلا. </font></font></font><font><font><font>كان اسمه في الأصل أنه NGLayout. </font></font></font><font><font><font>وظيفة أبو بريص هو لقراءة المحتوى على شبكة الإنترنت، مثل </font></font></font><font><font><font>HTML، </font></font></font><font><font><font>CSS، </font></font></font><font><font><font>كسول، </font></font></font><a href="/en-US/docs/JavaScript" title="جافا سكريبت"><font><font><font>جافا </font></font></font></a><font><font><font>سكريبت، </font></font></font><font><font><font>وجعله على شاشة المستخدم أو طباعته. </font></font></font><font><font><font>في التطبيقات المستندة XUL-يستخدم أبو بريص لتقديم واجهة المستخدم للتطبيق أيضا.</font></font></font></font></span></p> -</div> - -<p><font><font><font><font>يستخدم أبو بريص في العديد من التطبيقات، بما في ذلك عدد قليل من المتصفحات، مثل فايرفوكس، إضافات، وما إلى ذلك (للحصول على قائمة كاملة، يرجى الرجوع إلى </font></font></font></font><a class="external" href="http://en.wikipedia.org/wiki/Gecko_%28layout_engine%29#Web_browsers" rel="external" title="http://en.wikipedia.org/wiki/Gecko_(layout_engine)#Web_browsers"><font><font><font><font>ويكيبيديا المادة على أبو </font></font></font></font></a><font><font><font><font>بريص) </font></font></font><font><font><font>المنتجات التي تستخدم نفس الإصدار من أبو بريص على دعم مماثل للمعايير.</font></font></font></font></p> - -<table class="topicpage-table"> - <tbody> - <tr> - <td> - <h2 class="Documentation" id="توثيق"><font><font><font><font>توثيق</font></font></font></font></h2> - - <dl> - <dt><a href="/en-US/docs/Gecko_FAQ" title="Gecko_FAQ"><font><font><font><font>أبو بريص التعليمات</font></font></font></font></a></dt> - <dd><font><font><font><font>الأسئلة المتداولة حول أبو بريص.</font></font></font></font></dd> - <dt><a href="/en-US/docs/Gecko_DOM_Reference" title="https://developer.mozilla.org/en-US/docs/Gecko_DOM_Reference"><font><font><font><font>إشارة زغة DOM</font></font></font></font></a></dt> - <dd><font><font><font><font>إشارة إلى DOM.</font></font></font></font></dd> - <dt><a href="/en-US/docs/Gecko-Specific_DOM_Events" title="إشارة حدث أبو بريص / أبو بريص"><font><font><font><font>إشارة حدث أبو بريص</font></font></font></font></a></dt> - <dd><font><font><font><font>الرجوع إلى أحداث المستخدمة في التطبيقات أبو بريص وموزيلا. </font></font></font><font><font><font>للأحداث DOM القياسية على شبكة الإنترنت، انظر </font></font></font></font><a href="/en-US/docs/DOM/DOM_event_reference" title="DOM / إشارة الحدث DOM"><font><font><font><font>المرجع الحدث </font></font></font></font></a><font><font><font><font>DOM.</font></font></font></font></dd> - <dt><a href="/en-US/docs/Gecko/Versions" title="أبو بريص / إصدارات"><font><font><font><font>إصدارات أبو بريص والإصدارات تطبيق</font></font></font></font></a></dt> - <dd><font><font><font><font>إصدارات أبو بريص والتطبيقات انهم المستخدمة في.</font></font></font></font></dd> - <dt><a class="external" href="/en-US/docs/Introduction_to_Layout_in_Mozilla" title="https://developer.mozilla.org/en-US/docs/Introduction_to_Layout_in_Mozilla"><font><font><font><font>مقدمة في التخطيط في موزيلا</font></font></font></font></a></dt> - <dd><font><font><font><font>التكنولوجيا الحديث في التخطيط.</font></font></font></font></dd> - <dt><a href="/en-US/docs/Embedding_Mozilla" title="Embedding_Mozilla"><font><font><font><font>تضمين موزيلا</font></font></font></font></a></dt> - <dd><font><font><font><font>عن طريق أبو بريص في التطبيق الخاص بك.</font></font></font></font></dd> - <dt><a href="/en-US/docs/Character_Sets_Supported_by_Gecko" title="مجموعات الأحرف المعتمدة من قبل أبو بريص"><font><font><font><font>مجموعات الأحرف التي تدعمها أبو بريص</font></font></font></font></a></dt> - <dd><font><font><font><font>قائمة مجموعات الأحرف التي يدعمها أبو بريص.</font></font></font></font></dd> - <dt><a href="/en-US/docs/Gecko/HTML_parser_threading" title="أبو بريص / HTML_parser_threading"><font><font><font><font>HTML محلل خيوط</font></font></font></font></a></dt> - <dd><font><font><font><font>وصف خاصية تعدد في محلل HTML.</font></font></font></font></dd> - <dt><font><font><font><font>{{إنترويكي ('wikimo'، 'أبو بريص: Home_Page'، 'أبو بريص الصفحة الرئيسية على MozillaWiki')}}</font></font></font></font></dt> - <dd><font><font><font><font>الصفحة الرئيسية للمطورين النشط. </font></font></font><font><font><font>خرائط الطريق وأكثر ما يصل إلى تاريخ الموارد.</font></font></font></font></dd> - </dl> - - <p><span class="alllinks"><a href="/en-US/docs/tag/Gecko" title="العلامة / أبو بريص"><font><font><font><font>مشاهدة الكل...</font></font></font></font></a></span></p> - </td> - <td> - <h2 class="Community" id="مجتمع"><font><font><font><font>مجتمع</font></font></font></font></h2> - - <ul> - <li><font><font><font><font>عرض المنتديات موزيلا ... {{DiscussionList ("ديف التكنولوجيا تخطيط"، "mozilla.dev.tech.layout")}}</font></font></font></font></li> - </ul> - - <h2 class="Related_Topics" id="مواضيع_ذات_صلة"><font><font><font><font>مواضيع ذات صلة</font></font></font></font></h2> - - <dl> - <dd><a href="/en-US/docs/Web_Standards" title="Web_Standards"><font><font><font><font>معايير </font></font></font></font></a><font><font><font><font>الويب، </font></font></font><font><font><font>كسول، </font></font></font><a href="/en-US/docs/Embedding_Mozilla" title="Embedding_Mozilla"><font><font><font>تضمين </font></font></font></a><font><font><font>موزيلا، </font></font></font><a href="/en-US/docs/Developer_Guide" title="Developing_Mozilla"><font><font><font>تطوير موزيلا</font></font></font></a></font></dd> - </dl> - </td> - </tr> - </tbody> -</table> - -<p> </p> 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> diff --git a/files/ar/mozilla/mobile/index.html b/files/ar/mozilla/mobile/index.html deleted file mode 100644 index 669a69a9ed..0000000000 --- a/files/ar/mozilla/mobile/index.html +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: Mobile -slug: Mozilla/Mobile -tags: - - Mozilla - - NeedsTranslation - - TopicStub -translation_of: Mozilla/Mobile ---- -<h2 id="Firefox_OS" name="Firefox_OS"><a href="/en-US/docs/Mozilla/Firefox_OS">Firefox OS</a></h2> - -<p>Firefox OS is an open source mobile operating system which uses Linux and Mozilla's Gecko engine to run a user interface and set of applications written entirely in HTML, CSS and JavaScript.</p> - -<p>Read about how to install Firefox OS and how to develop apps for it.</p> - -<h2 id="Firefox_for_Android" name="Firefox_for_Android"><a href="/en-US/docs/Mozilla/Firefox_for_Android">Firefox for Android</a></h2> - -<p>Firefox for Android is Mozilla's mobile web browser for Android devices. It's recently been rewritten to use Android's native UI, making it faster, leaner and more responsive. It provides support for powerful APIs to access device capabilities such as the camera and telephony stack.</p> - -<p>Read about how to help create Firefox for Android, how to use its device APIs, and how to build mobile add-ons.</p> - -<h2 id="Firefox_for_iOS" name="Firefox_for_iOS"><a href="/en-US/docs/Mozilla/Firefox_for_iOS">Firefox for iOS</a></h2> - -<p>Firefox for iOS is Mozilla's upcoming mobile web browser for iOS devices. Because of AppStore restrictions, it uses the built in WebView supplied by iOS rather than Gecko.</p> - -<p>Read about how to help with Firefox for iOS, and how to integrate it with your other iOS Apps.</p> - -<h2 id="Mobile_web_development" name="Mobile_web_development"><a href="/en-US/docs/Web/Guide/Mobile">Mobile web development</a></h2> - -<p>Mobile devices have very different hardware characteristics from desktop or laptop computers, and many of the APIs used to work with them are still in the process of being standardized.</p> - -<p>Read about how to develop web sites that look good on mobile devices and take advantage of the new possibilities they offer. Learn how to make sure your web site works well on different browsers.</p> diff --git a/files/ar/mozilla/mobile/viewport_meta_tag/index.html b/files/ar/mozilla/mobile/viewport_meta_tag/index.html deleted file mode 100644 index ed8d36f6c8..0000000000 --- a/files/ar/mozilla/mobile/viewport_meta_tag/index.html +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Using the viewport meta tag to control layout on mobile browsers -slug: Mozilla/Mobile/Viewport_meta_tag -translation_of: Mozilla/Mobile/Viewport_meta_tag ---- -<p>The upcoming release of <a class="link-https" href="https://wiki.mozilla.org/Mobile/Fennec">Mobile Firefox (Fennec)</a> 1.1 features improved support for the <a href="/en-US/docs/Web/HTML/Element/meta#Attributes"><code><meta name="viewport"></code></a> tag. Previous versions of Fennec supported the <code>width</code>, <code>height</code>, and <code>initial-scale</code> viewport properties, but had <a class="external" href="http://starkravingfinkle.org/blog/2010/01/perils-of-the-viewport-meta-tag/">problems</a> with some sites designed for iPhone and Android browsers. We now support the same properties Mobile Safari does, and we also changed Fennec to render mobile sites more consistently on screens of different sizes and resolutions.</p> - -<p class="caption">touch.facebook.com before:</p> - -<p class="figure"><img alt="05-11-fennec-meta-viewport-2.png" class="default internal" src="/@api/deki/files/4371/=05-11-fennec-meta-viewport-2.png"></p> - -<p class="caption">touch.facebook.com after:</p> - -<p class="figure"><img alt="05-11-fennec-meta-viewport-1.png" class="default internal" src="/@api/deki/files/4372/=05-11-fennec-meta-viewport-1.png"></p> - -<p>You can see these changes for yourself in the latest <a class="external" href="http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mobile-1.9.2/">Fennec 1.1</a> and <a class="external" href="http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mobile-trunk/">trunk</a> nightly builds for Maemo, Windows, Mac, or Linux.</p> - -<h2 id="Background">Background</h2> - -<p>Mobile browsers like Fennec render pages in a virtual "window" (the viewport), usually wider than the screen, so they don't need to squeeze every page layout into a tiny window (which would break many non-mobile-optimized sites). Users can pan and zoom to see different areas of the page.</p> - -<p>Mobile Safari introduced the "viewport meta tag" to let web developers control the viewport's size and scale. Many other mobile browsers now support this tag, although it is not part of any web standard. Apple's <a class="external" href="http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html#//apple_ref/doc/uid/TP40006509-SW29">documentation</a> does a good job explaining how web developers can use this tag, but we had to do some detective work to figure out exactly how to implement it in Fennec. For example, Safari's documentation says the content is a "comma-delimited list," but existing browsers and web pages use any mix of commas, semicolons, and spaces as separators.</p> - -<p>Learn more about viewports in different mobile browsers in <a class="external" href="http://www.quirksmode.org/mobile/viewports2.html" title="http://www.quirksmode.org/mobile/viewports2.html">A Tale of Two Viewports</a> at quirksmode.org.</p> - -<h2 id="Viewport_basics">Viewport basics</h2> - -<p>A typical mobile-optimized site contains something like the following:</p> - -<pre><meta name="viewport" content="width=device-width, initial-scale=1"></pre> - -<p>The <code>width</code> property controls the size of the viewport. It can be set to a specific number of pixels like <code>width=600</code> or to the special value <code>device-width</code> value which is the width of the screen in CSS pixels at a scale of 100%. (There are corresponding <code>height</code> and <code>device-height</code> values, which may be useful for pages with elements that change size or position based on the viewport height.)</p> - -<p>The <code>initial-scale</code> property controls the zoom level when the page is first loaded. The <code>maximum-scale</code>, <code>minimum-scale</code>, and <code>user-scalable</code> properties control how users are allowed to zoom the page in or out.</p> - -<h2 id="A_pixel_is_not_a_pixel">A pixel is not a pixel</h2> - -<p>The iPhone and many popular Android phones have 3- to 4-inch (7–10 cm) screens with 320—480 pixels (~160 dpi). Firefox for Maemo runs on the Nokia N900, which has the same physical size but 480—800 pixels (~240 dpi). Because of this, the last version of Fennec displayed many pages about one third smaller (in actual, physical size) than iPhone or Android. This caused usability and readability problems on many touch-optimized web sites. Peter-Paul Koch wrote about this problem in <a class="external" href="http://www.quirksmode.org/blog/archives/2010/04/a_pixel_is_not.html">A pixel is not a pixel</a>.</p> - -<p>Fennec 1.1 for Maemo will use 1.5 hardware pixels for each CSS "pixel," following the lead of Android's WebKit-based browser. This means a page with <code>initial-scale=1</code> will render at close to the same physical size in Fennec for Maemo, Mobile Safari for iPhone, and the Android Browser on both <a class="external" href="http://developer.android.com/guide/practices/screens_support.html#range">HDPI and MDPI</a> phones. This is consistent with the <a class="external" href="http://www.w3.org/TR/CSS2/syndata.html#length-units">CSS 2.1 specification</a>, which says:</p> - -<blockquote> -<p>If the pixel density of the output device is very different from that of a typical computer display, the user agent should rescale pixel values. It is recommended that the pixel unit refer to the whole number of device pixels that best approximates the reference pixel. It is recommended that the reference pixel be the visual angle of one pixel on a device with a pixel density of 96dpi and a distance from the reader of an arm's length.</p> -</blockquote> - -<p>For web developers, this means that 320px be full width in portrait mode at scale=1, on all of the above-mentioned handheld devices, and they may size their layouts and images accordingly. But remember that not all mobile devices are the same width; you should also make sure that your pages work well in landscape mode, and on larger devices like the iPad and Android tablets.</p> - -<p>On 240-dpi screens, pages with <code>initial-scale=1</code> will effectively be zoomed to 150% by both Fennec and Android WebKit. Their text will be smooth and crisp, but their bitmap images will probably not take advantage of the full screen resolution. To get sharper images on these screens, web developers may want to design images – or whole layouts – at 150% of their final size (or 200%, to support 320-dpi devices such as a retina display iPhone) and then scale them down using CSS or viewport properties.</p> - -<p>The default ratio depends on the display density. On a display with density less than 200dpi, the ratio is 1.0. On displays with density between 200 and 300dpi, the ratio is 1.5. For displays with density over 300dpi, the ratio is the integer floor(<em>density</em>/150dpi). Note that the default ratio is true only when the viewport scale equals 1. Otherwise, the relationship between CSS pixels and device pixels depends on the current zoom level.</p> - -<h2 id="Viewport_width_and_screen_width">Viewport width and screen width</h2> - -<p>Many sites set their viewport to <code>"width=320, initial-scale=1"</code> to fit precisely onto the iPhone display in portrait mode. As mentioned above, this caused <a class="external" href="http://starkravingfinkle.org/blog/2010/01/perils-of-the-viewport-meta-tag/">problems</a> when Fennec 1.0 rendered these sites, especially in landscape mode. To fix this, Fennec 1.1 will expand the viewport width if necessary to fill the screen at the requested scale. This matches the behavior of Android and Mobile Safari, and is especially useful on large-screen devices like the iPad. (Allen Pike's <a class="external" href="http://www.antipode.ca/2010/choosing-a-viewport-for-ipad-sites/">Choosing a viewport for iPad sites</a> has a good explanation for web developers.)</p> - -<p>For pages that set an initial or maximum scale, this means the <code>width</code> property actually translates into a <em>minimum</em> viewport width. For example, if your layout needs at least 500 pixels of width then you can use the following markup. When the screen is more than 500 pixels wide, the browser will expand the viewport (rather than zoom in) to fit the screen:</p> - -<pre><meta name="viewport" content="width=500, initial-scale=1"></pre> - -<p>Fennec 1.1 also adds support for <code>minimum-scale</code>, <code>maximum-scale</code>, and <code>user-scalable</code>, with defaults and limits similar to <a class="external" href="http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html">Safari's</a>. These properties affect the initial scale and width, as well as limiting changes in zoom level.</p> - -<p>Mobile browsers handle orientation changes slightly differently. For example, Mobile Safari often just zooms the page when changing from portrait to landscape, instead of laying out the page as it would if originally loaded in landscape. If web developers want their scale settings to remain consistent when switching orientations on the iPhone, they must add a <code>maximum-scale</code> value to prevent this zooming, which has the sometimes-unwanted side effect of preventing users from zooming in:</p> - -<pre><meta name="viewport" content="initial-scale=1, maximum-scale=1"></pre> - -<p>This is not necessary in Fennec; when the device changes orientation, Fennec updates the viewport size, the page layout, and JavaScript/CSS properties like <code>device-width</code>, based on its new window dimensions.</p> - -<h2 id="Common_viewport_sizes_for_mobile_and_tablet_devices">Common viewport sizes for mobile and tablet devices</h2> - -<p>If want to know what mobile and tablet devices have which viewport widths, there is a comprehensive list of <a href="http://viewportsizes.com/" title="http://viewportsizes.com/">mobile and tablet viewport sizes here</a>. This gives information such as viewport width on portrait and landscape orientation as well as physical screen size, operating system and the pixel density of the device.</p> - -<h2 id="Specifications">Specifications</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{SpecName('CSS3 Device', '#viewport-meta', '<meta name="viewport">')}}</td> - <td>{{Spec2('CSS3 Device')}}</td> - <td>Non-normatively describes the Viewport META element</td> - </tr> - </tbody> -</table> - -<p>There is clearly demand for the viewport meta tag, since it is supported by most popular mobile browsers and used by thousands of web sites. It would be good to have a true standard for web pages to control viewport properties. As the standardization process proceeds, we at Mozilla will work to make sure we can implement any changes made during standardization.</p> diff --git a/files/ar/mozilla/preferences/index.html b/files/ar/mozilla/preferences/index.html deleted file mode 100644 index 4628f957cb..0000000000 --- a/files/ar/mozilla/preferences/index.html +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: Preferences -slug: Mozilla/Preferences -translation_of: Mozilla/Preferences ---- -<p>The preference system makes it possible to store data for Mozilla applications using a key/value pairing system. These articles provide information about how to use the preference system.</p> -<table class="topicpage-table"> - <tbody> - <tr> - <td> - <h2 class="Documentation" id="Documentation" name="Documentation">Documentation</h2> - <dl> - <dt><a href="/en-US/docs/Preferences/Preferences_system" title="Preferences/Preferences system">Preferences system</a></dt> - <dd>An introduction to using the preference system in Mozilla.</dd> - <dt><a href="/en-US/docs/XUL_School/Handling_Preferences" title="XUL School/Handling Preferences">XUL School: Handling preferences</a></dt> - <dd>The XUL School tutorial chapter on preferences.</dd> - <dt><a href="/en-US/docs/Preferences/Preference_reference" title="Preferences/Preference_reference">Mozilla preference reference</a></dt> - <dd>A reference guide to all Mozilla preferences; currently a work in progress.</dd> - <dt><a href="/en-US/docs/Preferences/A_brief_guide_to_Mozilla_preferences" title="Preferences/A brief guide to Mozilla preferences">A brief guide to Mozilla preferences</a></dt> - <dd>An introductory guide to where preferences are stored and other useful information about the core preference system.</dd> - <dt><a href="/en-US/docs/Preferences/Using_preferences_from_application_code" title="Preferences/Using preferences from application code">Using preferences from application code</a> {{gecko_minversion_inline("6.0")}}</dt> - <dd>Firefox 6 introduced static functions for accessing preferences efficiently from within application code. This API is not available for add-ons, but if you're working on a Gecko application, this API is the preferred way to access preferences.</dd> - <dt><a href="/en-US/docs/Preferences/Mozilla_networking_preferences" title="Preferences/Mozilla networking preferences">Mozilla networking preferences</a></dt> - <dd>A guide to key networking-related preferences.</dd> - <dt><a href="/en-US/docs/Preferences/Mozilla_preferences_for_uber-geeks" title="Preferences/Mozilla preferences for uber-geeks">Mozilla preferences for uber-geeks</a></dt> - <dd>A guide to preferences that only truly elite geeks should play with.</dd> - </dl> - <p><span class="alllinks"><a href="/en-US/docs/tag/Preferences" title="tag/Preferences">View all pages tagged with "Preferences"...</a></span></p> - </td> - <td> - <h2 class="Community" id="Examples" name="Examples">Examples</h2> - <dl> - <dt><a href="/en-US/docs/Code_snippets/Preferences" title="Code snippets/Preferences">Code snippets</a></dt> - <dd>Preference-related code snippets.</dd> - <dt><a href="/en-US/docs/Adding_preferences_to_an_extension" title="Adding preferences to an extension">Adding preferences to an extension</a></dt> - <dd>How to add preferences to an existing extension.</dd> - </dl> - <h2 class="Related_Topics" id="Related_Topics" name="Related_Topics">Related Topics</h2> - <ul> - <li><a href="/en-US/docs/XUL" title="XUL">XUL</a>, <a href="/en-US/docs/JavaScript" title="JavaScript">JavaScript</a>, <a href="/en-US/docs/XPCOM" title="XPCOM">XPCOM</a>, <a href="/en-US/docs/Extensions" title="Extensions">Extensions</a>, <a href="/en-US/docs/Developer_Guide" title="Developing_Mozilla">Developing Mozilla</a></li> - </ul> - </td> - </tr> - </tbody> -</table> diff --git a/files/ar/mozilla/projects/index.html b/files/ar/mozilla/projects/index.html deleted file mode 100644 index d7e62c6882..0000000000 --- a/files/ar/mozilla/projects/index.html +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Projects -slug: Mozilla/Projects -tags: - - Landing - - Mozilla - - NeedsContent - - NeedsTranslation - - Projects - - TopicStub -translation_of: Mozilla/Projects ---- -<p>Here you'll find links to documentation about various Mozilla projects; these are often parts of Firefox or other products, but may also be used in other projects as well.</p> - -<p>{{ LandingPageListSubpages() }}</p> diff --git a/files/ar/mozilla/projects/spidermonkey/index.html b/files/ar/mozilla/projects/spidermonkey/index.html deleted file mode 100644 index f39621af26..0000000000 --- a/files/ar/mozilla/projects/spidermonkey/index.html +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: 'SpiderMonkey: The Mozilla JavaScript runtime' -slug: Mozilla/Projects/SpiderMonkey -tags: - - NeedsTranslation - - SpiderMonkey - - TopicStub -translation_of: Mozilla/Projects/SpiderMonkey ---- -<div>{{SpiderMonkeySidebar}}</div> - -<div class="summary"> -<p><strong>SpiderMonkey</strong> is Mozilla's <a href="/en-US/docs/JavaScript" title="en-US/docs/JavaScript">JavaScript</a> engine written in C and C++. It is used in various Mozilla products, including Firefox, and is available under the MPL2.</p> -</div> - -<p>Standalone source code releases can be found on the <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases">Releases page</a>.</p> - -<div class="column-container"> -<div class="column-half"> -<h2 id="Creating" name="Creating">Guides</h2> - -<h3 id="Building">Building</h3> - -<dl> - <dt><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Build_Documentation" title="SpiderMonkey build documentation">SpiderMonkey Build Documentation</a></dt> - <dd>How to get SpiderMonkey source code, build it, and run the test suite.</dd> -</dl> - -<h3 id="Using_SpiderMonkey">Using SpiderMonkey</h3> - -<dl> - <dt><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Introduction_to_the_JavaScript_shell" title="Introduction to the JavaScript shell">Introduction to the JavaScript shell</a></dt> - <dd>Documentation of the command-line JavaScript shell, <code>js</code>.</dd> - <dt><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_User_Guide" title="en-US/docs/JSAPI_User_Guide">JSAPI User Guide</a></dt> - <dd>This guide provides an overview of SpiderMonkey and describes how you can embed engine calls in your applications to make them JavaScript-aware.</dd> - <dt><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_Cookbook" title="en-US/docs/SpiderMonkey/JSAPI_Phrasebook">JSAPI cookbook</a></dt> - <dd>Shows the JSAPI translation of some commonly used JavaScript expressions and statements.</dd> - <dt><a href="/en-US/docs/SpiderMonkey/GC_Rooting_Guide">GC Rooting Guide</a></dt> - <dd>Guide on how to write code compatible with the Generational GC in SpiderMonkey.</dd> - <dt><a href="/en-US/docs/How_to_embed_the_JavaScript_engine" title="en-US/docs/How_to_embed_the_JavaScript_engine">How to embed the JavaScript engine</a></dt> - <dd>An older tutorial about embedding SpiderMonkey.</dd> -</dl> - -<h2 id="Hacking_on_SpiderMonkey">Hacking on SpiderMonkey</h2> - -<dl> - <dt><a class="link-https" href="https://wiki.mozilla.org/JavaScript:New_to_SpiderMonkey" title="https://wiki.mozilla.org/JavaScript:New_to_SpiderMonkey">New to SpiderMonkey</a></dt> - <dd>A guide to hacking on SpiderMonkey.</dd> - <dt><a href="/en-US/docs/SpiderMonkey/Setting_up_CDT_to_work_on_SpiderMonkey" title="en-US/docs/SpiderMonkey/Setting up CDT to work on SpiderMonkey">Setting up CDT to work on SpiderMonkey</a></dt> - <dd>How to configure Eclipse to work on the SpiderMonkey code.</dd> -</dl> - -<dl> - <dt><a href="/en-US/docs/SpiderMonkey/Running_Automated_JavaScript_Tests" title="Running automated JavaScript tests">Running Automated JavaScript Tests</a></dt> - <dd>How to run the JavaScript test suites.</dd> - <dt><a href="/en-US/docs/SpiderMonkey/Creating_JavaScript_tests" title="en-US/docs/SpiderMonkey/Creating JavaScript tests">Creating JavaScript tests</a></dt> - <dd>How to add tests to the JavaScript test suites.</dd> -</dl> -</div> - -<div class="column-half"> -<h2 id="Reference">Reference</h2> - -<dl> - <dt><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_reference" title="en-US/docs/SpiderMonkey/JSAPI_Reference">JSAPI Reference</a></dt> - <dd>SpiderMonkey API reference.</dd> - <dt><a href="/en-US/docs/SpiderMonkey/JS_Debugger_API_Reference" title="en-US/docs/SpiderMonkey/JS Debugger API Reference">JS Debugger API Reference</a></dt> - <dd>API reference for the <code>Debugger</code> object introduced in SpiderMonkey 1.8.6, which corresponds to Gecko 8.0 {{ geckoRelease("8.0") }}.</dd> - <dt><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Internals/Bytecode">Bytecode descriptions</a></dt> - <dd>Listing of SpiderMonkey's bytecodes.</dd> - <dt><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API">Parser API</a></dt> - <dd>Reflection of the SpiderMonkey parser, made available as a JavaScript API.</dd> -</dl> - -<h2 id="Tips_tricks_and_philosophy">Tips, tricks and philosophy</h2> - -<dl> - <dt><a href="/en-US/docs/SpiderMonkey/Future_directions" title="en-US/docs/SpiderMonkey/Future_directions">Future Directions</a></dt> - <dd>Future directions for functionality, design, and coding practices.</dd> - <dt><a href="/en-US/docs/SpiderMonkey/Internals" title="en-US/docs/SpiderMonkey_Internals">SpiderMonkey Internals</a></dt> - <dd>A design overview and a file-by-file walkthrough of the implementation.</dd> - <dt><a href="/en-US/docs/SpiderMonkey/Bytecodes" title="en-US/docs/SpiderMonkey/Bytecodes">Bytecode Reference</a></dt> - <dd>SpiderMonkey bytecode reference.</dd> - <dt><a href="/en-US/docs/SpiderMonkey/Internals/Garbage_collection" title="en-US/docs/SpiderMonkey/Internals/GC">SpiderMonkey Internals: GC</a></dt> - <dd>Separate internals article on the GC</dd> - <dt><a href="/en-US/docs/SpiderMonkey/Hacking_Tips" title="en-US/docs/SpiderMonkey/Hacking_Tips">SpiderMonkey Internals: Hacking Tips </a></dt> - <dd>Collection of helpful tips & tools for hacking on the engine</dd> -</dl> - -<h2 class="Related_Topics" id="Related_Topics" name="Related_Topics">Related Topics</h2> - -<ul> - <li><a href="/en-US/docs/JavaScript" title="en-US/docs/JavaScript">JavaScript</a></li> - <li><a href="/en-US/docs/SpiderMonkey/FOSS" title="en-US/docs/SpiderMonkey/FOSS">FOSS projects using or based on SpiderMonkey</a></li> -</ul> - -<h2 id="Releases">Releases</h2> - -<dl> - <dt><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases">SpiderMonkey release notes</a></dt> - <dd>Current and past versions: <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/52">52</a>, <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/45">45</a>, <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/38">38</a>, <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/31">31</a>, <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/24">24</a>, <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/17">17</a></dd> -</dl> - -<h2 id="Community">Community</h2> - -<ul> - <li><a href="https://lists.mozilla.org/listinfo/dev-tech-js-engine">Mailing list</a></li> - <li><a href="http://stackoverflow.com/questions/tagged/spidermonkey">SpiderMonkey questions on Stack Overflow</a></li> - <li><a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=JavaScript%20Engine">Report a bug</a></li> -</ul> - -<dl> -</dl> -</div> -</div> diff --git a/files/ar/mozilla/projects/spidermonkey/introduction_to_the_javascript_shell/index.html b/files/ar/mozilla/projects/spidermonkey/introduction_to_the_javascript_shell/index.html deleted file mode 100644 index 80998587aa..0000000000 --- a/files/ar/mozilla/projects/spidermonkey/introduction_to_the_javascript_shell/index.html +++ /dev/null @@ -1,373 +0,0 @@ ---- -title: Introduction to the JavaScript shell -slug: Mozilla/Projects/SpiderMonkey/Introduction_to_the_JavaScript_shell -translation_of: Mozilla/Projects/SpiderMonkey/Introduction_to_the_JavaScript_shell ---- -<div><font><font>{{SpiderMonkeySidebar ("عام")}}</font></font></div> - -<div class="summary"> -<p><font><font>و </font></font><strong><font><font>جافا سكريبت قذيفة</font></font></strong><font><font> ( </font></font><code>js</code><font><font>) هو برنامج سطر الأوامر المدرجة في </font></font><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey" title="ar / SpiderMonkey"><font><font>سبايدر مونكي</font></font></a><font><font> توزيع المصدر. </font><font>إنه مكافئ جافا سكريبت لموجه Python التفاعلي ، أو حلقة Lisp للقراءة والتقييم والطباعة ، أو Ruby's </font></font><code>irb</code><font><font>. </font><font>تشرح هذه المقالة كيفية استخدام الصدفة لتجربة كود JavaScript وتشغيل برامج JavaScript.</font></font></p> -</div> - -<p><font><font>للحصول على SpiderMonkey JavaScript shell ، راجع </font></font><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Build_Documentation"><font><font>SpiderMonkey Build Documentation</font></font></a><font><font> أو قم بتنزيل ملف ثنائي </font><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Build_Documentation"><font>مترجم لمنصتك</font></a><font> من </font></font><a class="external" href="https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/" title="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/"><font><font>Nightly Builds</font></font></a><font><font> .</font></font></p> - -<p><font><font>للحصول على قائمة بأغلفة JavaScript الأخرى ، راجع </font></font><a class="internal" href="/en-US/docs/Web/JavaScript/Shells" title="قذائف En / JavaScript"><font><font>قذائف JavaScript</font></font></a><font><font> .</font></font></p> - -<div class="note"> -<p><font><font>ملاحظة: بدءًا من SpiderMonkey 44 {{geckoRelease (44)}} ، يتم استخدام إصدار JavaScript القياسي المتوافق مع الويب افتراضيًا (وليس JS1.7 + بعد الآن). </font><font>و </font></font><code>version()</code><font><font>قذيفة المضمن لا يزال هناك لاختبار الميزات القديمة.</font></font></p> -</div> - -<h2 id="Using_the_JavaScript_shell" name="Using_the_JavaScript_shell"><font><font>تشغيل قشرة JavaScript</font></font></h2> - -<p><font><font>تقدم القذيفة وضعين للتشغيل. </font><font>يمكنك استخدامه كصدفة تفاعلية ، حيث تكتب رمز JavaScript في الحال وتحصل على إشباع فوري ، وهو مفيد لتجربة الميزات الجديدة أو اختبارها. </font><font>يمكنك أيضًا تمرير ملف برنامج JavaScript في سطر الأوامر ليتم تشغيله ، وفي هذه الحالة يتم تشغيل البرنامج تلقائيًا.</font></font></p> - -<p><font><font>بعد اتباع وثائق الإنشاء وتثبيت الغلاف المدمج باستخدام إجراء التثبيت ، يمكنك تشغيل الصدفة في الوضع التفاعلي باستخدام الأمر:</font></font></p> - -<pre class="eval notranslate"><font><font>شبيبة -</font></font></pre> - -<p style="text-align: right;"><font><font>[إذا حصلت على "خطأ في البحث عن الرمز: ./js: رمز غير محدد: PR_SetCurrentThreadName" على سبيل المثال من وحدة تحكم Bash عند استخدام برنامج ثنائي تم تجميعه مسبقًا ، جرب <path to your Firefox's run-mozilla.sh> /run-mozilla.sh. / js - لقد نجحت معي]</font></font></p> - -<p><font><font>إذا كنت ترغب في تشغيل كود JavaScript في الملف </font></font><code>foo.js</code><font><font>، يمكنك استخدام هذا الأمر:</font></font></p> - -<pre class="eval notranslate"><font><font>js foo.js -</font></font></pre> - -<p><font><font>للتشغيل </font></font><code>foo.js</code><font><font>ثم الإسقاط في الغلاف التفاعلي ، قم بما يلي:</font></font></p> - -<pre class="eval notranslate"><font><font>js -f foo.js -i -</font></font></pre> - -<h2 id="مرجع"><font><font>مرجع</font></font></h2> - -<div class="note"><strong><font><font>ملاحظة:</font></font></strong><font><font> نظرًا لاستخدام JavaScript shell كبيئة اختبار لمحرك JavaScript ، يمكن أن تتغير الخيارات المتاحة والوظائف المضمنة بمرور الوقت.</font></font></div> - -<h3 id="Command_line_options" name="Command_line_options"><font><font>خيارات سطر الأوامر</font></font></h3> - -<p><font><font>هناك عدد من خيارات سطر الأوامر التي يمكنك تحديدها للتحكم في الغلاف. </font><font>هذه ملخصة أدناه. </font><font>تأكد من استخدام </font></font><strong><font><font>-h</font></font></strong><font><font> مع jsshell الخاص بك لمعرفة ما إذا كان هناك أي شيء غير موثق.</font></font></p> - -<dl> - <dt><code>-c, --compileonly</code></dt> - <dd><font><font>يخبر الغلاف بتجميع البرنامج ولكن لا يقوم بتشغيله. </font><font>هذه طريقة مناسبة للتحقق بسرعة من أخطاء بناء الجملة في برنامجك دون تشغيله فعليًا.</font></font></dd> - <dt><code>-e <em>script</em></code></dt> - <dd><font><font>يقوم بتشغيل </font></font><em><font><font>البرنامج النصي</font></font></em><font><font> المحدد </font><font>، وهو سلسلة حرفية تحتوي على الكود المطلوب تنفيذه.</font></font></dd> - <dt><code>-f <em>filename</em></code></dt> - <dd><font><font>يقوم بتشغيل برنامج JavaScript المحدد بواسطة </font></font><em><font><font>اسم الملف</font></font></em><font><font> .</font></font></dd> - <dt><code>-i</code></dt> - <dd><font><font>تمكن الوضع التفاعلي. </font><font>(افتراضي إذا لم يتم توفير اسم ملف.)</font></font></dd> - <dt><code>--no-ion</code></dt> - <dd><font><font>تعطيل برنامج التحويل البرمجي الأمثل JIT.</font></font></dd> - <dt><code>--no-baseline</code></dt> - <dd><font><font>تعطيل مترجم JIT الأساسي.</font></font></dd> - <dt><code>-P</code></dt> - <dd><font><font>إذا كان السطر الأول من الملف هو "/ usr / bin / env js -P" ، فسيتم تفسير محتوى الملف بواسطة محرك JavaScript.</font></font></dd> - <dd><font><font>يمكّنك هذا من إنشاء ملف JavaScript قابل للتنفيذ على أجهزة unix و OS X.</font></font></dd> - <dt><code>-s</code></dt> - <dd><font><font>لتمكين وضع التحذير الصارم.</font></font></dd> - <dt><code>-w, --warnings</code></dt> - <dd><font><font>تمكن رسائل التحذير.</font></font></dd> - <dt><code>-W</code><font><font>، - المعلومات</font></font></dt> - <dd><font><font>تعطيل رسائل التحذير.</font></font></dd> -</dl> - -<h3 id="Environment_options" name="Environment_options"><font><font>خيارات البيئة</font></font></h3> - -<p><font><font>هناك بعض متغيرات البيئة التي يمكن ضبطها لتغيير سلوك js shell.</font></font></p> - -<dl> - <dt><code>JS_STDOUT=<em>file</em></code></dt> - <dd><font><font>إعادة توجيه stdout إلى </font></font><em><font><font>ملف</font></font></em><font><font> .</font></font></dd> - <dt><code>JS_STDERR=<em>file</em></code></dt> - <dd><font><font>إعادة توجيه stderr إلى </font></font><em><font><font>ملف</font></font></em><font><font> .</font></font></dd> -</dl> - -<h3 id="Built-in_functions" name="Built-in_functions"><font><font>وظائف مدمجة</font></font></h3> - -<p><font><font>لجعل JavaScript shell أكثر فائدة ، هناك عدد من الوظائف المضمنة بشرط أن يمكنك استخدامها إما من برامج JavaScript أو في الوضع التفاعلي.</font></font></p> - -<div class="warning"> -<p><strong><font><font>ملاحظة</font></font></strong><font><font> : هذه القائمة غير مكتملة وتتداخل مع </font></font><a href="/en-US/docs/SpiderMonkey/Shell_global_objects"><font><font>كائنات شل العامة</font></font></a><font><font> . </font><font>راجع {{Source ("js / src / shell / js.cpp")}} (حول </font></font><code>shell_functions</code><font><font>) للمزيد.</font></font></p> -</div> - -<h4 id="build.28.29" name="build.28.29"><code>build()</code></h4> - -<p><font><font>لعرض التاريخ والوقت اللذين تم فيهما إنشاء غلاف JavaScript.</font></font></p> - -<div class="note"><strong><font><font>ملاحظة:</font></font></strong> <code>clear()</code><font><font> بدون أي معلمات يزيل كل شيء حقًا. </font><font>وهذا يشمل كل هذه الوظائف المدمجة.</font></font></div> - -<h4 id="clone.28function.2C_.5Bscope.5D.29" name="clone.28function.2C_.5Bscope.5D.29"><code>clone(<em>function, [scope]</em>)</code></h4> - -<p><font><font>استنساخ </font><font>كائن </font></font><var><font><font>الوظيفة</font></font></var><font><font> المحدد </font><font>. </font><font>إذا </font><font>لم يتم تحديد </font></font><var><font><font>النطاق</font></font></var><font><font> ، فسيكون الكائن الرئيسي الجديد هو نفسه الكائن الأصلي. </font><font>خلاف ذلك ، يتم وضع الكائن الجديد في نطاق الكائن المحدد بواسطة </font></font><var><font><font>النطاق</font></font></var><font><font> .</font></font></p> - -<h4 id="countHeap" name="countHeap"><code>countHeap(<em>[start[, kind]]</em>)</code></h4> - -<p><font><font>{{jsapi_minversion_inline ("1.8")}} احسب عدد أشياء GC الحية في الكومة ، أو الأشياء التي يمكن الوصول إليها من </font></font><var><font><font>البداية</font></font></var><font><font> عندما يتم تقديمها وليست فارغة. </font></font><var><font><font>النوع</font></font></var><font><font> هو إما </font></font><code>'all'</code><font><font>(افتراضي) لعد كل الأشياء أو واحد من </font></font><code>'object'</code><font><font>، </font></font><code>'double'</code><font><font>، </font></font><code>'string'</code><font><font>، </font></font><code>'function'</code><font><font>، </font></font><code>'qname'</code><font><font>، </font></font><code>'namespace'</code><font><font>، </font></font><code>'xml'</code><font><font>لحساب الأشياء من هذا النوع فقط.</font></font></p> - -<h4 id="evalcx.28string.5B.2C_object.5D.29" name="evalcx.28string.5B.2C_object.5D.29"><code>dumpHeap(<em>[fileName[, start[, toFind[, maxDepth[, toIgnore]]]]]</em>)</code></h4> - -<p><font><font>{{jsapi_minversion_inline ("1.8")}} تفريغ الرسم البياني لجميع الكائنات الموجودة (أو رسم فرعي محدد مثير للاهتمام) إلى ملف. </font><font>لمزيد من المعلومات ، راجع إصدار C / C ++ من هذه الوظيفة ، </font></font><code>JS_DumpHeap</code><font><font>.</font></font></p> - -<h4 id="evalcx.28string.5B.2C_object.5D.29" name="evalcx.28string.5B.2C_object.5D.29"><code>evalcx(<em>string[, object]</em>)</code></h4> - -<p><font><font>يقيم كود JavaScript في </font></font><em><font><font>السلسلة</font></font></em><font><font> . </font><font>إذا </font><font>تم تحديد </font></font><em><font><font>الكائن</font></font></em><font><font> ، فسيتم تنفيذ الكود في هذا الكائن ، ومعاملته كصندوق حماية.</font></font></p> - -<p><font><font>إذا كانت </font></font><em><font><font>السلسلة</font></font></em><font><font> فارغة ولم </font><font>يتم تحديد </font></font><em><font><font>الكائن</font></font></em><font><font> ، يتم </font></font><code>evalcx()</code><font><font>إرجاع كائن جديد بفئات قياسية متلهفة.</font></font></p> - -<p><font><font>إذا كانت </font></font><em><font><font>السلسلة</font></font></em><font><font> "lazy" ولم </font><font>يتم تحديد </font></font><em><font><font>الكائن</font></font></em><font><font> ، يتم </font></font><code>evalcx()</code><font><font>إرجاع كائن جديد بفئات قياسية كسولة.</font></font></p> - -<div class="note"><strong><font><font>ملاحظة:</font></font></strong> <code>evalcx()</code><font><font> هذا مفيد فقط للأشخاص الذين يقومون بعمل داخلي عميق على محرك JavaScript ، </font></font><code>evalInSandbox</code><font><font>لبيئات تشبه </font><font>الاختبار </font><font>في الغلاف.</font></font></div> - -<h4 id="gc.28.29" name="gc.28.29"><code>gc()</code></h4> - -<p><font><font>يدير جامع القمامة لتحرير الذاكرة.</font></font></p> - -<h4 id="gcparam.28.29" name="gcparam.28.29"><code>gcparam(<em>name[, value]</em>)</code></h4> - -<p><font><font>{{jsapi_minversion_inline ("1.8")}} قراءة أو تهيئة معلمات أداة تجميع البيانات المهملة.</font></font></p> - -<p><font><font>و </font></font><em><font><font>اسم</font></font></em><font><font> يجب أن يكون واحدا من مفاتيح المعلمة (مثل </font></font><code>'maxBytes'</code><font><font>، </font></font><code>'maxMallocBytes'</code><font><font>أو ' </font></font><code>gcNumber</code><font><font>') حددها </font></font><code>FOR_EACH_GC_PARAM</code><font><font>في </font></font><a href="https://searchfox.org/mozilla-central/source/js/src/builtin/TestingFunctions.cpp#464"><font><font>https://searchfox.org/mozilla-central/source/js/src/builtin/TestingFunctions.cpp#464</font></font></a><font><font> .</font></font></p> - -<p><font><font>إذا </font><font>لم يتم تحديد </font></font><em><font><font>القيمة</font></font></em><font><font> ، يتم </font></font><code>gcparam()</code><font><font>إرجاع القيمة الحالية المرتبطة بمعلمة GC المسماة </font></font><em><font><font>بالاسم</font></font></em><font><font> .</font></font></p> - -<p><font><font>إذا </font><font>تم تحديد </font></font><em><font><font>القيمة</font></font></em><font><font> ، يجب أن تكون قابلة للتحويل إلى uint32 موجب ؛ </font></font><code>gcparam()</code><font><font>يحدد </font></font><em><font><font>اسم</font></font></em><font><font> معلمة GC </font><font>إلى </font></font><em><font><font>قيمة</font></font></em><font><font> .</font></font></p> - -<p><font><font>لمزيد من المعلومات ، راجع دالات C / C ++ </font></font><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_GetGCParameter"><code>JS_GetGCParameter</code></a><font><font>و </font></font><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_GetGCParameter"><code>JS_SetGCParameter</code></a><font><font>.</font></font></p> - -<h4 id="gczeal.28.29" name="gczeal.28.29"><code>gczeal(level)</code></h4> - -<p><font><font>{{jsapi_minversion_inline ("1.8")}} </font></font><code>DEBUG</code><font><font>فقط. </font><font>اضبط مستوى حماسة GC ، ميزة تصحيح الأخطاء. </font><font>يمكن أن يكون هذا 0 لجمع القمامة الدورية العادية ، أو 1 لـ GC المتكرر للغاية ، أو 2 لـ </font><font>GC المتكرر </font></font><em><font><font>للغاية</font></font></em><font><font> . </font><font>أي شيء بخلاف 0 سيجعل JavaScript يعمل ببطء شديد ولكنه قد يساعد في الكشف عن الأخطاء المتعلقة بـ GC أو إعادة إنتاجها. </font><font>لمزيد من المعلومات ، راجع إصدار C / C ++ من هذه الوظيفة ، </font></font><a class="internal" href="/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_SetGCZeal" title="ar / SpiderMonkey / JSAPI Reference / JS SetGCZeal"><code>JS_SetGCZeal</code></a><font><font>.</font></font></p> - -<h4 id="getpda.28object.29" name="getpda.28object.29"><code>getpda(<em>object</em>)</code></h4> - -<p><font><font>إرجاع واصفات الخصائص </font></font><em><font><font>للكائن</font></font></em><font><font> المحدد </font><font>.</font></font></p> - -<h4 id="getslx.28object.29" name="getslx.28object.29"><code>getslx(<em>object</em>)</code></h4> - -<p>Returns the script line extent, which is the number of lines of code comprising the specified object.</p> - -<h4 id="help.28.5Bcommand_....5D.29" name="help.28.5Bcommand_....5D.29"><code>help(<em>[command ...]</em>)</code></h4> - -<p>Displays brief help information about the specified commands, or about all available functions if none are specified.</p> - -<h4 id="intern.28string.29" name="intern.28string.29"><code>intern(<em>string</em>)</code></h4> - -<p>Internalizes the specified <var>string</var> into the atom table. Every string has a unique identifier, called an atom. This system makes it easier to do comparisons between strings.</p> - -<div class="note"><strong>Note:</strong> This function is intended only for use when testing the JavaScript engine.</div> - -<h4 id="line2pc.28.5Bfunction.2C_.5D_line.29" name="line2pc.28.5Bfunction.2C_.5D_line.29"><code>line2pc(<em>[function, ] line</em>)</code></h4> - -<p>Returns the program counter value corresponding to the specified <em>line</em> of code. If <em>function</em> is specified, <em>line</em> is an offset into the specified function.</p> - -<h4 id="load.28filename1_.5Bfilename.5D.29" name="load.28filename1_.5Bfilename.5D.29"><code>load(<em>filename1</em> <em>[filename]</em>)</code></h4> - -<p>Loads the JavaScript files with the specified names.</p> - -<div class="note"><strong>Note:</strong> For loading non-JavaScript files, use <code>read()</code>.</div> - -<h4 id="options.28.5Boption_....5D.29" name="options.28.5Boption_....5D.29"><code>options(<em>[option ...]</em>)</code></h4> - -<p>Lets you set or get options. If you specified options on the command line, the results of calling <code>options</code> will indicate which options you requested. You can also pass in new options to set.</p> - -<p>The available options are:</p> - -<table class="standard-table"> - <tbody> - <tr> - <td class="header">Option Name</td> - <td class="header">Description</td> - </tr> - <tr> - <td><code>strict</code></td> - <td>Strict mode is enabled.</td> - </tr> - <tr> - <td><code>werror</code></td> - <td>Warnings should be treated as errors.</td> - </tr> - <tr> - <td><code>atline</code></td> - <td>When <code>atline</code> is enabled, comments of the form <code>//@line <em>num</em></code> set the number of the following line to <code><em>num</em></code>.</td> - </tr> - </tbody> -</table> - -<h4 id="pc2line.28function.2C_.5Bpc.5D.29" name="pc2line.28function.2C_.5Bpc.5D.29"><code>pc2line(<em>function, [pc]</em>)</code></h4> - -<p>Returns the line number of the JavaScript code that corresponds to the first line of the specified <em>function</em>. If you specify a program counter offset into the function, the line number of the line of code containing that offset is returned.</p> - -<h4 id="print.28.5Bexpression_....5D.29" name="print.28.5Bexpression_....5D.29"><code>print(<em>[expression ...]</em>)</code></h4> - -<p>Evaluates the <em>expression(s)</em> and displays the result(s) on <code>stdout</code>, separated by spaces (" ") and terminated by a newline ("\n").</p> - -<h4 id="print.28.5Bexpression_....5D.29" name="print.28.5Bexpression_....5D.29"><code>putstr(<em>expression</em>)</code></h4> - -<p>Evaluates the <em>expression</em> and displays the result on <code>stdout</code>.</p> - -<h4 id="quit.28.29" name="quit.28.29"><code>quit(<em>[status]</em>)</code></h4> - -<p>Exits the shell. <em>status</em> defaults to 0 if omitted.</p> - -<h4 id="read.28filename.5B.2C_type.5D.29" name="read.28filename.5B.2C_type.5D.29"><code>read(<em>filename[, type]</em>)</code></h4> - -<p>Reads and returns the contents of file. If type is "binary" returns an <code>Uint8Array</code>, otherwise returns an UTF-8 decoded string.</p> - -<h4 id="readline.28.29" name="readline.28.29"><code>readline()</code></h4> - -<p>Reads a single line of input from <code>stdin</code>, returning it to the caller. You can use this to create interactive shell programs in JavaScript.</p> - -<h4 id="scatter.28fnArray.29" name="scatter.28fnArray.29">Reflect.parse()</h4> - -<p>See <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API" title="ar / SpiderMonkey / Parser_API">Parser API</a>.</p> - -<div class="note"><strong>Note:</strong> This function is intended only for use when testing the JavaScript engine.</div> - -<h4 id="seal.28object.5B.2C_deep.5D.29" name="seal.28object.5B.2C_deep.5D.29"><code>seal(<em>object[, deep]</em>)</code></h4> - -<p>Seals the specified <em>object</em>, or an object graph if <em>deep</em> is <code>true</code>. By sealing an object or object graph, you disable modification of those objects.</p> - -<h4 id="sleep.28dt.29" name="sleep.28dt.29"><code>sleep(dt)</code></h4> - -<p>{{ jsapi_minversion_inline("1.8") }} Only in <code><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_THREADSAFE" title="en/SpiderMonkey/JSAPI_Reference/JS_THREADSAFE">JS_THREADSAFE</a></code> builds. Sleep for <em>dt</em> seconds. Fractions of a second are supported. Returns <code>true</code> on success, <code>false</code> if the sleep was interrupted.</p> - -<h4 id="stackQuota" name="stackQuota"><code>stackQuota(<em>[number]</em>)</code> {{obsolete_inline}}</h4> - -<p>Get or set the script stack quota.</p> - -<h4 id="throwError.28.29" name="throwError.28.29"><code>throwError()</code></h4> - -<p>Throws an error from the <code>JS_ReportError()</code> function.</p> - -<div class="note"><strong>Note:</strong> This function is intended only for use when testing the JavaScript engine.</div> - -<h4 id="trap.28.5Bfunction.2C_.5Bpc.2C.5D.5D_expression.29" name="trap.28.5Bfunction.2C_.5Bpc.2C.5D.5D_expression.29"><code>trap(<em>[function, [pc,]] expression</em>)</code></h4> - -<p>Sets a trap at the specific point in the JavaScript code. When the bytecode at the offset specified by <em>pc</em> in the function <em>function</em> is about to be executed, the <em>expression</em> is evaluated.</p> - -<p>This is a powerful debugging mechanism when used in concert with <code>line2pc()</code>. For example, if you want to display a message when line 6 of a function, <code>doSomething()</code> is executed, you can enter the following:</p> - -<pre class="notranslate">trap(doSomething, line2pc(doSomething, 6), "print('line 6!\n')"); -</pre> - -<div class="note"><strong>Note:</strong> When a trap is set, the corresponding bytecode in the program is replaced with a <code>trap</code> bytecode until you use <code>untrap()</code> to remove the trap.</div> - -<h4 id="untrap.28function_.5B.2C_pc.5D.29" name="untrap.28function_.5B.2C_pc.5D.29"><code>untrap(<em>function [, pc]</em>)</code></h4> - -<p>Removes a trap from the specified <em>function</em> at the offset <em>pc</em>. If <em>pc</em> isn't specified, the trap is removed from the function's entry point.</p> - -<p>This function has no effect if there is no trap at the specified location.</p> - -<h4 id="version.28.5Bnumber.5D.29" name="version.28.5Bnumber.5D.29"><code>version(<em>[number]</em>)</code></h4> - -<p>The <code>version()</code> function lets you get or set the JavaScript version number. This may be useful for gaining access to syntax only available in certain versions of JavaScript (for example, see <a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/1.7#Using_JavaScript_1.7" title="ar / New_in_JavaScript_1.7 # Using_JavaScript_1.7">Using JavaScript 1.7</a>).</p> - -<h3 id="Debug_functions" name="Debug_functions">Debug functions</h3> - -<p>These built-in functions are only available in <code>DEBUG</code> builds.</p> - -<h4 id="dis.28.5Bfunction.5D.29" name="dis.28.5Bfunction.5D.29"><code>dis(<em>[function]</em>)</code></h4> - -<p>Disassembles the JavaScript bytecode for the entire program, or for the specified <em>function</em>.</p> - -<p>For example, if you enter the JavaScript function below:</p> - -<pre class="eval notranslate">function test() { - var i = 3; - print(i+2); -} -</pre> - -<p>Then run the command <code>dis(test);</code>, you get this output:</p> - -<pre class="notranslate">main: -00000: uint16 3 -00003: setvar 0 -00006: pop -00007: name "print" -00010: pushobj -00011: getvar 0 -00014: uint16 2 -00017: add -00018: call 1 -00021: pop -00022: stop - -Source notes: - 0: 0 [ 0] newline - 1: 3 [ 3] decl offset 0 - 2: 7 [ 4] newline - 3: 18 [ 11] xdelta - 4: 18 [ 0] pcbase offset 11 -</pre> - -<h4 id="dissrc.28.5Bfunction.5D.29" name="dissrc.28.5Bfunction.5D.29"><code>dissrc(<em>[function]</em>)</code></h4> - -<p>Disassembles the JavaScript bytecode for the entire program, or for the specified <em>function</em>, showing the source lines. This function only works with programs loaded from files, either using the <code>-f</code> flag on launching the shell, or by using the <code>load()</code> function.</p> - -<p>If your program includes a function, <code>doStuff()</code>, like this:</p> - -<pre class="notranslate">function doStuff(input) { - print("Enter a number: "); - var n1 = readline(); - print("Enter another one: "); - var n2 = readline(); - - print("You entered " + n1 + " and " + n2 + "\n"); -} -</pre> - -<p>Calling <code>dissrc(doStuff)</code> function would give this output:</p> - -<pre class="notranslate">;------------------------- 10: print("Enter a number: "); -00000: 10 name "print" -00003: 10 pushobj -00004: 10 string "Enter a number: " -00007: 10 call 1 -00010: 10 pop -;------------------------- 11: var n1 = readline(); -00011: 11 name "readline" -00014: 11 pushobj -00015: 11 call 0 -00018: 11 setvar 0 -00021: 11 pop -;------------------------- 12: print("Enter another one: "); -00022: 12 name "print" -00025: 12 pushobj -00026: 12 string "Enter another one: " -00029: 12 call 1 -00032: 12 pop -;------------------------- 13: var n2 = readline(); -00033: 13 name "readline" -00036: 13 pushobj -00037: 13 call 0 -00040: 13 setvar 1 -00043: 13 pop -;------------------------- 14: -;------------------------- 15: print("You entered " + n1 + " and " + n2 + "\n"); -00044: 15 name "print" -00047: 15 pushobj -00048: 15 string "You entered " -00051: 15 getvar 0 -00054: 15 add -00055: 15 string " and " -00058: 15 add -00059: 15 getvar 1 -00062: 15 add -00063: 15 string "\\n" -00066: 15 add -00067: 15 call 1 -00070: 15 pop -00071: 15 stop -</pre> - -<h4 id="dumpheap.28.28.5BfileName.5B.2C_start.5B.2C_toFind.5B.2C_maxDepth.5B.2C_toIgnore.5D.5D.5D.5D.5D.29" name="dumpheap.28.28.5BfileName.5B.2C_start.5B.2C_toFind.5B.2C_maxDepth.5B.2C_toIgnore.5D.5D.5D.5D.5D.29"><code>dumpheap((<em>[fileName[, start[, toFind[, maxDepth[, toIgnore]]]]]</em>)</code></h4> - -<p>Dump GC information. This is a thin wrapper for <code><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_DumpHeap" title="en/SpiderMonkey/JSAPI_Reference/JS_DumpHeap">JS_DumpHeap</a></code>.</p> - -<h4 id="gczeal.28zeal.29" name="gczeal.28zeal.29"><code>gczeal(<em>zeal</em>)</code></h4> - -<p><font><font>قم بتمكين GC المتكرر للمساعدة في العثور على مخاطر GC. </font></font><em><font><font>الحماسة</font></font></em><font><font> عدد صحيح. </font><font>المعنى هو نفسه بالنسبة للمعلمة </font></font><sup><code><a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_SetGCZeal" title="en/SpiderMonkey/JSAPI_Reference/JS_SetGCZeal">JS_SetGCZeal</a></code></sup><font><font>.</font></font></p> - -<h4 id="notes.28.5Bfunction.5D.29" name="notes.28.5Bfunction.5D.29"><code>notes(<em>[function]</em>)</code></h4> - -<p><font><font>يظهر ملاحظات المصدر للوظيفة المحددة. </font><font>تحتوي ملاحظات المصدر على معلومات تقوم بتعيين الرمز الثانوي إلى الكود المصدري ، والذي يتم استخدامه عند فك الشفرة ، مثل عند استخدام </font></font><code>dissrc()</code><font><font>الوظيفة.</font></font></p> diff --git a/files/ar/mozilla/tech/index.html b/files/ar/mozilla/tech/index.html deleted file mode 100644 index f9682e62e1..0000000000 --- a/files/ar/mozilla/tech/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Mozilla technologies -slug: Mozilla/Tech -tags: - - Landing - - Mozilla - - NeedsTranslation - - Reference - - TopicStub - - XUL -translation_of: Mozilla/Tech ---- -<p>Mozilla has several technologies used as components of its projects. These are documented here. (flesh out this text).</p> -<p>{{LandingPageListSubpages}}</p> |