- Based on new (last) translation download from getlocalization.com
- Removed untranslated strings. Getlocalization started including those at some point
which is highly annoying, unnecessary and breaks the new transfix system,
since it'll mark all of the english strings as actual translations
- Avoid dots in entities. It confuses the Transifex YML parser
- Removed some locales unknown to Transifex which didn't have any translations anyway
- Removed "lolcat" locale, uses custom notation (en@lolcal)
which SilverStripe's i18n system can't handle
(needs mapping from SS naming to Zend naming)
- Renamed "Te Reo/Maori" locale from "mi_NZ" to "mi" (Transifex/CLDR notation)
- Namespaced all entities used in templates (deprecated usage)
- Converted dots to underscores where template filenames are used for namespaces,
since Transifex YML parsing handles them as separate YML keys otherwise
- Removed whitespace in entity names, SilverStripe i18n can't handle it
- Only allow selection of locales registered through i18n::$all_locales to avoid
issues with unknown locales in Zend's CLDR database
API Added Convert::nl2os function to normalise end of line characters across systems with tests
BUG Fixed i18n unit tests in non-unix systems constantly failing
BUG Fixed problems with HTMLCleaner tests failing in non-unix systems
Avoids breaking execution if PHPUnit is not installed,
since classes in framework/dev/ extend PHPUnit,
and get autoloaded when we inspect the ancestry and implementors
of every class defined on the filesystem.
Not an ideal, since it removes i18n support for dev classes,
but in practice this only impacts a single entity definition.
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit. This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
In certain cases (e.g. with the mi_NZ locale),
the i18n system would regard a langage as already
loaded if it was restored from a cached, but empty
translation list (through Zend_Translate).
This was due to the cache key being generated
based solely on the content, rather than taking
other options like the locale into account.
The collector didn't find classes marked as entity providers
unless they were already loaded as a sideeffect of the preceding
execution path. Since we want to introspect the whole codebase,
autoloading is mandatory here.
i18nTextCollector takes an argument to restrict text collection to specific modules.
This used to restrict by limiting the modules scanned by the text collector. But
modules can actually provide translations for other modules (see for e.g.
CMSMenu#provideI18nEntities)
This patch changes the text collector to scan all modules, and then apply the restriction
to the output
This fixes en_GB translations not being picked up. i18n::get_translators() will always have a fallback of "en" language without the
region, and "en_US" as the locale.