зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1570239 - GenerateMessages in Localization.webidl shouldn't take locales parameter. r=Pike
Differential Revision: https://phabricator.services.mozilla.com/D40081 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
fb004baac4
Коммит
afd14b912e
|
@ -40,11 +40,11 @@ dictionary L10nMessage {
|
|||
};
|
||||
|
||||
/**
|
||||
* A callback function which takes a list of locales and a list
|
||||
* of localization resources and produces an iterator over
|
||||
* FluentBundle objects used for localization with fallbacks.
|
||||
* A callback function which takes a list of localization resources
|
||||
* and produces an iterator over FluentBundle objects used for
|
||||
* localization with fallbacks.
|
||||
*/
|
||||
callback GenerateMessages = Promise<any> (sequence<DOMString> aAppLocales, sequence<DOMString> aResourceIds);
|
||||
callback GenerateMessages = Promise<any> (sequence<DOMString> aResourceIds);
|
||||
|
||||
/**
|
||||
* Localization is an implementation of the Fluent Localization API.
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
const { FluentBundle, FluentResource } =
|
||||
ChromeUtils.import("resource://gre/modules/Fluent.jsm");
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {
|
||||
const bundle = new FluentBundle(locales);
|
||||
async function* mockGenerateMessages(resourceIds) {
|
||||
const bundle = new FluentBundle("en-US");
|
||||
bundle.addResource(new FluentResource(`
|
||||
key1 = Value for Key 1
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
const { FluentBundle, FluentResource } =
|
||||
ChromeUtils.import("resource://gre/modules/Fluent.jsm");
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {
|
||||
const bundle = new FluentBundle(locales);
|
||||
async function* mockGenerateMessages(resourceIds) {
|
||||
const bundle = new FluentBundle("en-US");
|
||||
bundle.addResource(new FluentResource(`
|
||||
key1 = Value for Key 1
|
||||
`));
|
||||
|
|
|
@ -47,8 +47,8 @@
|
|||
const { FluentBundle, FluentResource } =
|
||||
ChromeUtils.import("resource://gre/modules/Fluent.jsm");
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {
|
||||
const bundle = new FluentBundle(locales);
|
||||
async function* mockGenerateMessages(resourceIds) {
|
||||
const bundle = new FluentBundle("en-US");
|
||||
bundle.addResource(new FluentResource(`
|
||||
key1 = Value for Key 1
|
||||
`));
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
const { FluentBundle, FluentResource } =
|
||||
ChromeUtils.import("resource://gre/modules/Fluent.jsm");
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {
|
||||
const bundle = new FluentBundle(locales);
|
||||
async function* mockGenerateMessages(resourceIds) {
|
||||
const bundle = new FluentBundle("en-US");
|
||||
bundle.addResource(new FluentResource(`
|
||||
key1 = Value for Key 1
|
||||
key2 = Value for Key 2
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
const { FluentBundle, FluentResource } =
|
||||
ChromeUtils.import("resource://gre/modules/Fluent.jsm");
|
||||
|
||||
async function * generateMessages(locales, resourceIds) {
|
||||
const bundle = new FluentBundle(locales);
|
||||
async function * generateMessages(resourceIds) {
|
||||
const bundle = new FluentBundle("en-US");
|
||||
bundle.addResource(new FluentResource(`
|
||||
file-menu =
|
||||
.label = File
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<script type="application/javascript">
|
||||
"use strict";
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {}
|
||||
async function* mockGenerateMessages(resourceIds) {}
|
||||
|
||||
window.onload = function() {
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
const { FluentBundle, FluentResource } =
|
||||
ChromeUtils.import("resource://gre/modules/Fluent.jsm");
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {
|
||||
const bundle = new FluentBundle(locales);
|
||||
async function* mockGenerateMessages(resourceIds) {
|
||||
const bundle = new FluentBundle("en-US");
|
||||
bundle.addResource(new FluentResource("title = Hello World"));
|
||||
bundle.addResource(new FluentResource("title2 = Hello Another World"));
|
||||
yield bundle;
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
const { FluentBundle, FluentResource } =
|
||||
ChromeUtils.import("resource://gre/modules/Fluent.jsm");
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {
|
||||
const bundle = new FluentBundle(locales);
|
||||
async function* mockGenerateMessages(resourceIds) {
|
||||
const bundle = new FluentBundle("en-US");
|
||||
bundle.addResource(new FluentResource("title = <strong>Hello</strong> World"));
|
||||
bundle.addResource(new FluentResource(`title2 = This is <a data-l10n-name="link">a link</a>!`));
|
||||
yield bundle;
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
const { FluentBundle } =
|
||||
ChromeUtils.import("resource://gre/modules/Fluent.jsm");
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {
|
||||
const bundle = new FluentBundle(locales);
|
||||
async function* mockGenerateMessages(resourceIds) {
|
||||
const bundle = new FluentBundle("en-US");
|
||||
// No translations!
|
||||
yield bundle;
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
const { FluentBundle, FluentResource } =
|
||||
ChromeUtils.import("resource://gre/modules/Fluent.jsm");
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {
|
||||
const bundle = new FluentBundle(locales);
|
||||
async function* mockGenerateMessages(resourceIds) {
|
||||
const bundle = new FluentBundle("en-US");
|
||||
bundle.addResource(new FluentResource(`title = Visit <a data-l10n-name="mozilla-link">Mozilla</a> or <a data-l10n-name="firefox-link">Firefox</a> website!`));
|
||||
yield bundle;
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
const { FluentBundle, FluentResource } =
|
||||
ChromeUtils.import("resource://gre/modules/Fluent.jsm");
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {
|
||||
const bundle = new FluentBundle(locales);
|
||||
async function* mockGenerateMessages(resourceIds) {
|
||||
const bundle = new FluentBundle("en-US");
|
||||
bundle.addResource(new FluentResource(`title = Visit <a data-l10n-name="mozilla-link">Mozilla</a> or <a data-l10n-name="firefox-link">Firefox</a> website!`));
|
||||
yield bundle;
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
const { FluentBundle, FluentResource } =
|
||||
ChromeUtils.import("resource://gre/modules/Fluent.jsm");
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {
|
||||
const bundle = new FluentBundle(locales);
|
||||
async function* mockGenerateMessages(resourceIds) {
|
||||
const bundle = new FluentBundle("en-US");
|
||||
bundle.addResource(new FluentResource(`
|
||||
key1 =
|
||||
.href = https://www.hacked.com
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
const { FluentBundle, FluentResource } =
|
||||
ChromeUtils.import("resource://gre/modules/Fluent.jsm");
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {
|
||||
const bundle = new FluentBundle(locales);
|
||||
async function* mockGenerateMessages(resourceIds) {
|
||||
const bundle = new FluentBundle("en-US");
|
||||
bundle.addResource(new FluentResource(`
|
||||
key1 = Translation For Key 1
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<script type="application/javascript">
|
||||
"use strict";
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {}
|
||||
async function* mockGenerateMessages(resourceIds) {}
|
||||
|
||||
window.onload = function() {
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
const { FluentBundle, FluentResource } =
|
||||
ChromeUtils.import("resource://gre/modules/Fluent.jsm");
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {
|
||||
const bundle = new FluentBundle(locales);
|
||||
async function* mockGenerateMessages(resourceIds) {
|
||||
const bundle = new FluentBundle("en-US");
|
||||
bundle.addResource(new FluentResource("title = Hello World"));
|
||||
bundle.addResource(new FluentResource("link =\n .title = Click me"));
|
||||
yield bundle;
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
const { FluentBundle, FluentResource } =
|
||||
ChromeUtils.import("resource://gre/modules/Fluent.jsm");
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {
|
||||
const bundle = new FluentBundle(locales);
|
||||
async function* mockGenerateMessages(resourceIds) {
|
||||
const bundle = new FluentBundle("en-US");
|
||||
bundle.addResource(new FluentResource("title = Hello World"));
|
||||
bundle.addResource(new FluentResource("subtitle = Welcome to FluentBundle"));
|
||||
yield bundle;
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
const { FluentBundle, FluentResource } =
|
||||
ChromeUtils.import("resource://gre/modules/Fluent.jsm");
|
||||
|
||||
async function* mockGenerateMessages(locales, resourceIds) {
|
||||
const bundle = new FluentBundle(locales);
|
||||
async function* mockGenerateMessages(resourceIds) {
|
||||
const bundle = new FluentBundle("en-US");
|
||||
bundle.addResource(new FluentResource("title = Hello World"));
|
||||
bundle.addResource(new FluentResource("title2 = Hello Another World"));
|
||||
yield bundle;
|
||||
|
|
Загрузка…
Ссылка в новой задаче