Having completed the work of packaging the “Hyphenation-Dictionary” seperately for Reftests, I have officially shipped code for the first part of the proposal. Now we have code for downloading the “Hyphenation-Dictionary” at runtime. Initially we have added the files to be downloaded to a static catalog. Copying the resources to the Kinto Server will involve changing the static catalog. It is merely a step to change the source address and find the appropriate checksums and update the same in the catalog. Other than this change the code of syncing, verifying, and downloading the dictionary is present in the codebase. Now we have to make sure that everything is or to be shipped is working as per the requirements. We need to have a flag to enable the feature of downloading the dictionary files at runtime, by doing this we can enable the feature or disable the feature anytime.
This involves some changes in the configuration files. In the codebase there are few configuration files where the flags can be set. The unified file where the older “Hyphenation-Dictionary” related flags were present is old.configure. There are newer configuration files in the codebase. The related configuration should be included in the newer file moz.configure
In old.configure file I have removed the following lines.
MOZ_EXCLUDE_HYPHENATION_DICTIONARIES= dnl ========================================================= dnl = Whether to exclude hyphenations files in the build dnl ========================================================= if test -n "$MOZ_EXCLUDE_HYPHENATION_DICTIONARIES"; then AC_DEFINE(MOZ_EXCLUDE_HYPHENATION_DICTIONARIES) fi AC_SUBST(MOZ_EXCLUDE_HYPHENATION_DICTIONARIES)
Having removed the related configuration from the global configuration file. I have included the necessary configuration in the configuration file that is specific to the android build. In moz.configure I have added the following lines to enable the “Hyphenation-Dictionary” in the Nightly Build.
project_flag('MOZ_EXCLUDE_HYPHENATION_DICTIONARIES', help='Excluding hyphenation-dictionaries from the build') @depends(milestone) def is_exclude_hyphenation_dictionary_flag_enabled(milestone): return milestone.is_nightly set_config('MOZ_EXCLUDE_HYPHENATION_DICTIONARIES', is_exclude_hyphenation_dictionary_flag_enabled) set_define('MOZ_EXCLUDE_HYPHENATION_DICTIONARIES', is_exclude_hyphenation_dictionary_flag_enabled)
By adding the above line in the configuration, the “Hyphenation-Dictionaries” are excluded from the build and the runtime download of the dictionary is enabled.