|
62 | 62 | To generate translations using the ``fluent.runtime`` package, you start with |
63 | 63 | the `FluentBundle` class: |
64 | 64 |
|
65 | | - >>> from fluent.bundle import FluentBundle |
| 65 | + >>> from fluent.runtime import FluentBundle |
66 | 66 |
|
67 | 67 | You pass a list of locales to the constructor - the first being the desired |
68 | 68 | locale, with fallbacks after that: |
@@ -133,9 +133,9 @@ through locale-aware formatting functions: |
133 | 133 |
|
134 | 134 |
|
135 | 135 | You can specify your own formatting options on the arguments passed in by |
136 | | -wrapping your numeric arguments with `fluent.types.fluent_number`: |
| 136 | +wrapping your numeric arguments with `fluent.runtime.types.fluent_number`: |
137 | 137 |
|
138 | | - >>> from fluent.bundle.types import fluent_number |
| 138 | + >>> from fluent.runtime.types import fluent_number |
139 | 139 | >>> points = fluent_number(1234567, useGrouping=False) |
140 | 140 | >>> bundle.format("show-total-points", {'points': points})[0] |
141 | 141 | 'You have 1234567 points.' |
@@ -174,9 +174,9 @@ currently the only supported options to `DATETIME` are: |
174 | 174 | * `dateStyle` and `timeStyle` which are [proposed |
175 | 175 | additions](https://github.com/tc39/proposal-ecma402-datetime-style) to the ECMA i18n spec. |
176 | 176 |
|
177 | | -To specify options from Python code, use `fluent.bundle.types.fluent_date`: |
| 177 | +To specify options from Python code, use `fluent.runtime.types.fluent_date`: |
178 | 178 |
|
179 | | - >>> from fluent.bundle.types import fluent_date |
| 179 | + >>> from fluent.runtime.types import fluent_date |
180 | 180 | >>> today = date.today() |
181 | 181 | >>> short_today = fluent_date(today, dateStyle='short') |
182 | 182 | >>> val, errs = bundle.format("today-is", {"today": short_today }) |
@@ -242,7 +242,7 @@ and `DATETIME` builtins), and in this case must accept the following types of |
242 | 242 | arguments: |
243 | 243 |
|
244 | 244 | * unicode strings (i.e. `unicode` on Python 2, `str` on Python 3) |
245 | | -* `fluent.bundle.types.FluentType` subclasses, namely: |
| 245 | +* `fluent.runtime.types.FluentType` subclasses, namely: |
246 | 246 | * `FluentNumber` - `int`, `float` or `Decimal` objects passed in externally, |
247 | 247 | or expressed as literals, are wrapped in these. Note that these objects also |
248 | 248 | subclass builtin `int`, `float` or `Decimal`, so can be used as numbers in |
|
0 commit comments