- MessageContext
Message contexts are single-language stores of translations. They are responsible for parsing translation resources in the FTL syntax and can format translation units (entities) to strings.
Always use
MessageContext.format
to retrieve translation units from a context. Translations can contain references to other entities or external arguments, conditional logic in form of select expressions, traits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf8 | |
# Any copyright is dedicated to the Public Domain. | |
# http://creativecommons.org/publicdomain/zero/1.0/ | |
from __future__ import absolute_import | |
import fluent.syntax.ast as FTL | |
from fluent.migrate import COPY | |
from fluent.migrate.helpers import transforms_from |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
pref-page | |
.title = { PLATFORM() -> | |
[win] Options | |
*[other] Preferences | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf8 | |
import fluent.syntax.ast as FTL | |
from fluent.migrate import COPY | |
def migrate(ctx): | |
"""Bug 1411012 - Migrate privacy settings to FTL, part {index}""" | |
ctx.maybe_add_localization( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
### Localization for Server-side strings of Firefox Screenshots | |
### Please don't localize Firefox, Firefox Screenshots, or Screenshots | |
## Global phrases shared across pages, prefixed with 'g' | |
gMyShots = My Shots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
key = Value | |
key.attr = Attribute | |
key.attr2 = Attribute 2 | |
key.attr = Attribute | |
key.attr2 = Attribute 2 | |
key = | |
Multiline | |
Value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Try editing the translations here! | |
shared-photos = { $user_name } { $photo_count -> | |
[0] hasn't added any photos yet | |
[one] added a new photo | |
*[other] added { $photo_count } new photos | |
}. | |
liked-comment = { $user_name } liked your comment on { $user_gender -> | |
[male] his |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
# browser/locales/en-US/browser/menubar.ftl | |
[[ File menu ]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @license | |
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | |
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | |
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | |
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | |
* Code distributed by Google as part of the polymer project is also | |
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | |
*/ | |
// @version 0.7.22-251f4af |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SECRET_KEY=hiphopopotamus | |
DJANGO_DEV=True | |
DJANGO_DEBUG=True | |
DATABASE_URL=postgres://pontoon:pontoon@localhost/pontoon | |
SESSION_COOKIE_SECURE=False | |
SITE_URL=http://localhost:8000 | |
FXA_CLIENT_ID=2651b9211a44b7b2 | |
FXA_SECRET_KEY=a3cafccbafe39db54f2723f8a6f804c337e362950f197b5b33050d784129d570 | |
FXA_OAUTH_ENDPOINT=https://oauth-stable.dev.lcip.org/v1 | |
FXA_PROFILE_ENDPOINT=https://stable.dev.lcip.org/profile/v1 |