Open bobbingwide opened 3 years ago
I've created a new version of the extraction and localization routines in bobbingwide/oik-i18n/issues/9 which now supports extraction translation and localization of rich text strings. These changes need to be tested in Fizzie before the Gutenberg proposal is updated.
t10n
needs to be updated to work with a different directory structure.
Having updated t10n
I was able to re-activate the template part override to demonstrate the loading of localized template parts on the front end.
I can't remember whether or not I managed to achieve loading of localized templates but I've found a note that suggests I didn't bother. It says
We can implement a local solution for the Fizzie theme that doesn't require changes to Gutenberg with the following assumptions.
- The block-template files only contain non-translatable content
https://github.com/bobbingwide/oik-i18n/issues/7#issuecomment-739234264
The current logic for overriding template parts doesn't work for template parts that are created in the Site Editor or Post Editor. On the front end it displays a message saying that the language file couldn't be found. The logic doesn't try to locate the post for the template part.
Full Site Editing themes should support internationalization (i18n) and localization (l10n).
The process to extract and localize is summarized by this diagram.
Requirements
en_GB
bb_BB
Proposed solution
t10n.bat
to automate the translation into UK English and bbboing.Requirements on Gutenberg
languages
folder, with one directory per supported locale.Assumptions, scope, exclusions and caveats
makepot
.makejson
.Limitations of the prototyped solution
t10n.bat
is currently dependent upon oik-batch's oikt10n
..pot
files into one file prior to translation.