Avoid usage of localized strings before initialization during import in many modules
This happens if import is done before i18n setup
(InstallLocalRessources()).
This affects PLCOpenEditor mostly. Beremiz IDE is free from this issue, but moving
initialization from import should make modules more robust.
Otherwise execution result depends on where and when import was done
and this is not a good thing.
Some modules (ConfigTreeNode, features, CodeFileEditor related
classes) still have this, but they are used only in Beremiz.
Most problems result in non-working internatialization.
In some cases (VariablePanel) there is backtrace, because localized
key is not found in non-localized dictionary.
all:
@echo "Please specify target 'source_list', 'template' or 'locales'"
template:
@echo To generate translation template message.pot file:
python mki18n.py -p --domain=Beremiz
locales:
@echo "Generate .mo files for all languages:"
python mki18n.py -m --moTarget=../locale --domain=Beremiz
source_list:
echo @To "Generate list with source files: app.fil:"
find .. -name "*.py" -exec grep -q '_(' {} ';' -print -o -name "*XSD*" -print -o -name "*.csv" -print | grep -v '/build/' | grep -v '/pyjs/' > app.fil
echo "../plcopen/Additional_Function_Blocks.xml" >> app.fil
echo "../plcopen/Standard_Function_Blocks.xml" >> app.fil
.PHONY: all, template, locales, source_list