@@ -7,11 +7,11 @@ import FluentResource from "./resource";
7
7
* format translation units (entities) to strings.
8
8
*
9
9
* Always use `FluentBundle.format` to retrieve translation units from a
10
- * context . Translations can contain references to other entities or variables,
10
+ * bundle . Translations can contain references to other entities or variables,
11
11
* conditional logic in form of select expressions, traits which describe their
12
12
* grammatical features, and can use Fluent builtins which make use of the
13
13
* `Intl` formatters to format numbers, dates, lists and more into the
14
- * context 's language. See the documentation of the Fluent syntax for more
14
+ * bundle 's language. See the documentation of the Fluent syntax for more
15
15
* information.
16
16
*/
17
17
export default class FluentBundle {
@@ -20,7 +20,7 @@ export default class FluentBundle {
20
20
* Create an instance of `FluentBundle`.
21
21
*
22
22
* The `locales` argument is used to instantiate `Intl` formatters used by
23
- * translations. The `options` object can be used to configure the context .
23
+ * translations. The `options` object can be used to configure the bundle .
24
24
*
25
25
* Examples:
26
26
*
@@ -45,7 +45,7 @@ export default class FluentBundle {
45
45
*
46
46
* - `transform` - a function used to transform string parts of patterns.
47
47
*
48
- * @param {string|Array<string> } locales - Locale or locales of the context
48
+ * @param {string|Array<string> } locales - Locale or locales of the bundle
49
49
* @param {Object } [options]
50
50
* @returns {FluentBundle }
51
51
*/
@@ -74,7 +74,7 @@ export default class FluentBundle {
74
74
}
75
75
76
76
/*
77
- * Check if a message is present in the context .
77
+ * Check if a message is present in the bundle .
78
78
*
79
79
* @param {string } id - The identifier of the message to check.
80
80
* @returns {bool }
@@ -97,11 +97,11 @@ export default class FluentBundle {
97
97
}
98
98
99
99
/**
100
- * Add a translation resource to the context .
100
+ * Add a translation resource to the bundle .
101
101
*
102
102
* The translation resource must use the Fluent syntax. It will be parsed by
103
- * the context and each translation unit (message) will be available in the
104
- * context by its identifier.
103
+ * the bundle and each translation unit (message) will be available in the
104
+ * bundle by its identifier.
105
105
*
106
106
* bundle.addMessages('foo = Foo');
107
107
* bundle.getMessage('foo');
@@ -120,7 +120,7 @@ export default class FluentBundle {
120
120
}
121
121
122
122
/**
123
- * Add a translation resource to the context .
123
+ * Add a translation resource to the bundle .
124
124
*
125
125
* The translation resource must be an instance of FluentResource,
126
126
* e.g. parsed by `FluentResource.fromString`.
@@ -163,7 +163,7 @@ export default class FluentBundle {
163
163
/**
164
164
* Format a message to a string or null.
165
165
*
166
- * Format a raw `message` from the context into a string (or a null if it has
166
+ * Format a raw `message` from the bundle into a string (or a null if it has
167
167
* a null value). `args` will be used to resolve references to variables
168
168
* passed as arguments to the translation.
169
169
*
0 commit comments