You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've verified that I use the latest version of aab
I've checked if anyone else suggested this feature before by looking through the issue reports.
Problem case
Currently gettext localization files (.po files) in the addon are only copied (if they are located in the src directory).
But Python's gettext module can only read the compiled version of these files (.mo files).
Solution
My solution:
aab should compile any .po file encountered automatically and only add resulting .mo files at the same position to the built addon. The .po files should not be added.
Alternatives I have though of:
Currently the only alternative for the user is to compile the files before the addon is built, maybe committing the unreadable binary .mo files in the process, or compile them after the addon is already built, either by awkwardly editing the zip file or by editing the files after Anki installed them.
In all cases all localization files have to be compiled one by one.
Maybe the user could use a shell script to automate the process, but in that case the modifications still have to be done at a position where they seem unreasonable for me, because source files and the built (and compiled) addon are not clearly separated.
This fixesglutanimate#9
+ Add new 'check_exists' function to 'utils.py'
+ Add '_build_locales' method to 'builder.py'
+ Add section describing the new feature to 'README.md'
This fixesglutanimate#9
+ Add new 'check_exists' function to 'utils.py'
+ Add '_build_locales' method to 'builder.py'
+ Add section describing the new feature to 'README.md'
Checklist
aab
Problem case
Currently
gettext
localization files (.po
files) in the addon are only copied (if they are located in thesrc
directory).But Python's
gettext
module can only read the compiled version of these files (.mo
files).Solution
My solution:
aab
should compile any.po
file encountered automatically and only add resulting.mo
files at the same position to the built addon. The.po
files should not be added.Alternatives I have though of:
Currently the only alternative for the user is to compile the files before the addon is built, maybe committing the unreadable binary
.mo
files in the process, or compile them after the addon is already built, either by awkwardly editing the zip file or by editing the files after Anki installed them.In all cases all localization files have to be compiled one by one.
Maybe the user could use a shell script to automate the process, but in that case the modifications still have to be done at a position where they seem unreasonable for me, because source files and the built (and compiled) addon are not clearly separated.
More information
This issue is directly correlated with
glutanimate/image-occlusion-enhanced#124
and the corresponding PR
glutanimate/image-occlusion-enhanced#125
The text was updated successfully, but these errors were encountered: