openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
GNU Affero General Public License v3.0
633 stars 371 forks source link

Enable Crowdin in context translations #1738

Open teolemon opened 5 years ago

teolemon commented 5 years ago

When the Crowdin In-Context tool is enabled, the archive with your project translation will include one additional language. It is required to store operational data about localization strings. Integrate this pseudo-language to your app along with other languages you translate to. You will have to switch your application to this language as one of the requirements to enable In-Context localization. lol/common.po

<script type="text/javascript">
  var _jipt = [];
  _jipt.push(['project', 'openfoodfacts']);
</script>
<script type="text/javascript" src="//cdn.crowdin.com/jipt/jipt.js"></script>

It's important to add the Crowdin In-Context script before any other scripts, at the section of your document. Make sure this script is included on every page with localizable text. Optionally, you can include this JavaScript snippet only when the pseudo-language is active.

Part of

teolemon commented 4 years ago

Pull request available #2421