mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-05 21:45:37 +00:00
ICU-20660 Add usePoolBundle option to filters.json.
This commit is contained in:
parent
3bdb509ac5
commit
2fa4c4d502
4 changed files with 32 additions and 6 deletions
|
@ -673,6 +673,21 @@ implicithan version, put the following setting in your *filters.json* file:
|
|||
"collationUCAData": "implicithan"
|
||||
}
|
||||
|
||||
### Disable Pool Bundle
|
||||
|
||||
By default, ICU uses a "pool bundle" to store strings shared between locales.
|
||||
This saves space and is recommended for most users. However, when developing
|
||||
a system where locale data files may be added "on the fly" and not included in
|
||||
the original ICU distribution, those additional data files may not be able to
|
||||
use a pool bundle due to name collisions with the existing pool bundle.
|
||||
|
||||
To disable the pool bundle in the current ICU build, put the following setting
|
||||
in your *filters.json* file:
|
||||
|
||||
{
|
||||
"usePoolBundle": false
|
||||
}
|
||||
|
||||
### File Substitution
|
||||
|
||||
Using the configuration file, you can perform whole-file substitutions. For
|
||||
|
|
|
@ -42,48 +42,49 @@ def generate(config, glob, common_vars):
|
|||
"locales",
|
||||
None,
|
||||
"icu-locale-deprecates.xml",
|
||||
True,
|
||||
config.use_pool_bundle,
|
||||
[])
|
||||
|
||||
requests += generate_tree(config, glob, common_vars,
|
||||
"curr",
|
||||
"curr",
|
||||
"icu-locale-deprecates.xml",
|
||||
True,
|
||||
config.use_pool_bundle,
|
||||
[])
|
||||
|
||||
requests += generate_tree(config, glob, common_vars,
|
||||
"lang",
|
||||
"lang",
|
||||
"icu-locale-deprecates.xml",
|
||||
True,
|
||||
config.use_pool_bundle,
|
||||
[])
|
||||
|
||||
requests += generate_tree(config, glob, common_vars,
|
||||
"region",
|
||||
"region",
|
||||
"icu-locale-deprecates.xml",
|
||||
True,
|
||||
config.use_pool_bundle,
|
||||
[])
|
||||
|
||||
requests += generate_tree(config, glob, common_vars,
|
||||
"zone",
|
||||
"zone",
|
||||
"icu-locale-deprecates.xml",
|
||||
True,
|
||||
config.use_pool_bundle,
|
||||
[])
|
||||
|
||||
requests += generate_tree(config, glob, common_vars,
|
||||
"unit",
|
||||
"unit",
|
||||
"icu-locale-deprecates.xml",
|
||||
True,
|
||||
config.use_pool_bundle,
|
||||
[])
|
||||
|
||||
requests += generate_tree(config, glob, common_vars,
|
||||
"coll",
|
||||
"coll",
|
||||
"icu-coll-deprecates.xml",
|
||||
# Never use pool bundle for coll, brkitr, or rbnf
|
||||
False,
|
||||
# Depends on timezoneTypes.res and keyTypeData.res.
|
||||
# TODO: We should not need this dependency to build collation.
|
||||
|
@ -94,6 +95,7 @@ def generate(config, glob, common_vars):
|
|||
"brkitr",
|
||||
"brkitr",
|
||||
"icu-locale-deprecates.xml",
|
||||
# Never use pool bundle for coll, brkitr, or rbnf
|
||||
False,
|
||||
[DepTarget("brkitr_brk"), DepTarget("dictionaries")])
|
||||
|
||||
|
@ -101,6 +103,7 @@ def generate(config, glob, common_vars):
|
|||
"rbnf",
|
||||
"rbnf",
|
||||
"icu-rbnf-deprecates.xml",
|
||||
# Never use pool bundle for coll, brkitr, or rbnf
|
||||
False,
|
||||
[])
|
||||
|
||||
|
|
|
@ -151,6 +151,11 @@ class Config(object):
|
|||
if "strategy" in self.filters_json_data:
|
||||
self.strategy = self.filters_json_data["strategy"]
|
||||
|
||||
# True or False (could be extended later to support enum/list)
|
||||
self.use_pool_bundle = True
|
||||
if "usePoolBundle" in self.filters_json_data:
|
||||
self.use_pool_bundle = self.filters_json_data["usePoolBundle"]
|
||||
|
||||
def _parse_filter_file(self, f):
|
||||
# Use the Hjson parser if it is available; otherwise, use vanilla JSON.
|
||||
try:
|
||||
|
|
|
@ -69,6 +69,9 @@
|
|||
"collationUCAData": {
|
||||
"type": "string",
|
||||
"enum": ["unihan", "implicithan"]
|
||||
},
|
||||
"usePoolBundle": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
|
Loading…
Add table
Reference in a new issue