Skip to content

Commit 23b6e9c

Browse files
committed
Module fluent.bundle -> fluent.runtime, and docs fixes
1 parent 93d342a commit 23b6e9c

21 files changed

+28
-28
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Usage
6262
To generate translations using the ``fluent.runtime`` package, you start with
6363
the `FluentBundle` class:
6464

65-
>>> from fluent.bundle import FluentBundle
65+
>>> from fluent.runtime import FluentBundle
6666

6767
You pass a list of locales to the constructor - the first being the desired
6868
locale, with fallbacks after that:
@@ -133,9 +133,9 @@ through locale-aware formatting functions:
133133

134134

135135
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`:
137137

138-
>>> from fluent.bundle.types import fluent_number
138+
>>> from fluent.runtime.types import fluent_number
139139
>>> points = fluent_number(1234567, useGrouping=False)
140140
>>> bundle.format("show-total-points", {'points': points})[0]
141141
'You have 1234567 points.'
@@ -174,9 +174,9 @@ currently the only supported options to `DATETIME` are:
174174
* `dateStyle` and `timeStyle` which are [proposed
175175
additions](https://github.com/tc39/proposal-ecma402-datetime-style) to the ECMA i18n spec.
176176

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`:
178178

179-
>>> from fluent.bundle.types import fluent_date
179+
>>> from fluent.runtime.types import fluent_date
180180
>>> today = date.today()
181181
>>> short_today = fluent_date(today, dateStyle='short')
182182
>>> 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
242242
arguments:
243243

244244
* 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:
246246
* `FluentNumber` - `int`, `float` or `Decimal` objects passed in externally,
247247
or expressed as literals, are wrapped in these. Note that these objects also
248248
subclass builtin `int`, `float` or `Decimal`, so can be used as numbers in

fluent.runtime/runtests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
# This file is symlinked from both fluent.bundle and fluent.syntax directories
3+
# This file is symlinked from both fluent.runtime and fluent.syntax directories
44

55
import argparse
66
import subprocess

fluent.runtime/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
'Programming Language :: Python :: 2.7',
2525
'Programming Language :: Python :: 3.5',
2626
],
27-
packages=['fluent', 'fluent.bundle'],
27+
packages=['fluent', 'fluent.runtime'],
2828
install_requires=[
2929
'fluent>=0.9,<0.10',
3030
'attrs',

fluent.runtime/tests/format/test_arguments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import unittest
44

5-
from fluent.bundle import FluentBundle
5+
from fluent.runtime import FluentBundle
66

77
from ..utils import dedent_ftl
88

0 commit comments

Comments
 (0)