__init__.py |
|
18 |
checks |
|
|
commands.py |
Check the localization status of gecko applications.
The first arguments are paths to the l10n.toml or ini files for the
applications, followed by the base directory of the localization repositories.
Then you pass in the list of locale codes you want to compare. If there are
no locales given, the list of locales will be taken from the l10n.toml file
or the all-locales file referenced by the application\'s l10n.ini. |
8666 |
compare |
|
|
keyedtuple.py |
A tuple with keys.
A Sequence type that allows to refer to its elements by key.
Making this immutable, 'cause keeping track of mutations is hard.
compare-locales uses strings for Entity keys, and tuples in the
case of PO. Support both.
In the interfaces that check for membership, dicts check keys and
sequences check values. Always try our dict cache `__map` first,
and fall back to the superclass implementation.
|
1506 |
lint |
|
|
merge.py |
Merge resources across channels.
Merging resources is done over a series of parsed resources, or source
strings.
The nomenclature is that the resources are ordered from newest to oldest.
The generated file structure is taken from the newest file, and then the
next-newest, etc. The values of the returned entities are taken from the
newest to the oldest resource, too.
In merge_resources, there's an option to choose the values from oldest
to newest instead.
|
4650 |
mozpath.py |
Like :py:mod:`os.path`, with a reduced set of functions, and with normalized
path separators (always use forward slashes).
Also contains a few additional utilities not found in :py:mod:`os.path`.
|
4234 |
parser |
|
|
paths |
|
|
plurals.py |
|
4001 |
serializer.py |
Serialize string changes.
The serialization logic is based on the cross-channel merge algorithm.
It's taking the file structure for the first file, and localizable entries
from the last.
Input data is the parsed reference as a list of parser.walk(),
the existing localized file, also a list of parser.walk(), and a dictionary
of newly added keys and raw values.
To remove a string from a localization, pass `None` as value for a key.
The marshalling between raw values and entities is done via Entity.unwrap
and Entity.wrap.
To avoid adding English reference strings into the generated file, the
actual entities in the reference are replaced with Placeholders, which
are removed in a final pass over the result of merge_resources. After that,
we also prune whitespace once more.`
|
4295 |
util.py |
|
448 |