tests/canopen_master/canopen@canfestival/master@CanOpenNode/master.od
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Wed, 29 Aug 2018 18:53:02 +0300
changeset 2301 5b8a7dd43f9f
parent 411 8261c8f1e365
permissions -rw-r--r--
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.
<?xml version="1.0"?>
<!DOCTYPE PyObject SYSTEM "PyObjects.dtd">
<PyObject module="node" class="Node" id="173548044">
<attr name="Profile" type="dict" id="173547276" >
</attr>
<attr name="Description" type="string" value="" />
<attr name="Dictionary" type="dict" id="173547004" >
  <entry>
    <key type="numeric" value="4096" />
    <val type="numeric" value="0" />
  </entry>
  <entry>
    <key type="numeric" value="4097" />
    <val type="numeric" value="0" />
  </entry>
  <entry>
    <key type="numeric" value="4120" />
    <val type="list" id="172243596" >
      <item type="numeric" value="0" />
      <item type="numeric" value="0" />
      <item type="numeric" value="0" />
      <item type="numeric" value="0" />
    </val>
  </entry>
</attr>
<attr name="SpecificMenu" type="list" id="172243852" >
</attr>
<attr name="ParamsDictionary" type="dict" id="173551796" >
</attr>
<attr name="UserMapping" type="dict" id="173551932" >
</attr>
<attr name="DS302" type="dict" id="172206524" >
  <entry>
    <key type="numeric" value="7968" />
    <val type="dict" id="172959508" >
      <entry>
        <key type="string" value="need" />
        <val type="False" value="" />
      </entry>
      <entry>
        <key type="string" value="values" />
        <val type="list" id="172244812" >
          <item type="dict" id="173546596" >
            <entry>
              <key type="string" value="access" />
              <val type="string" value="ro" />
            </entry>
            <entry>
              <key type="string" value="pdo" />
              <val type="False" value="" />
            </entry>
            <entry>
              <key type="string" value="type" />
              <val type="numeric" value="5" />
            </entry>
            <entry>
              <key type="string" value="name" />
              <val type="string" value="Number of Entries" />
            </entry>
          </item>
          <item type="dict" id="173552204" >
            <entry>
              <key type="string" value="access" />
              <val type="string" value="rw" />
            </entry>
            <entry>
              <key type="string" value="pdo" />
              <val type="False" value="" />
            </entry>
            <entry>
              <key type="string" value="type" />
              <val type="numeric" value="15" />
            </entry>
            <entry>
              <key type="string" value="name" />
              <val type="string" value="Store DCF for node %d[(sub)]" />
            </entry>
            <entry>
              <key type="string" value="nbmax" />
              <val type="numeric" value="127" />
            </entry>
          </item>
        </val>
      </entry>
      <entry>
        <key type="string" value="name" />
        <val type="string" value="Store DCF" />
      </entry>
      <entry>
        <key type="string" value="struct" />
        <val type="numeric" value="7" />
      </entry>
    </val>
  </entry>
  <entry>
    <key type="numeric" value="7969" />
    <val type="dict" id="173546732" >
      <entry>
        <key type="string" value="need" />
        <val type="False" value="" />
      </entry>
      <entry>
        <key type="string" value="values" />
        <val type="list" id="172253420" >
          <item type="dict" id="173552612" >
            <entry>
              <key type="string" value="access" />
              <val type="string" value="ro" />
            </entry>
            <entry>
              <key type="string" value="pdo" />
              <val type="False" value="" />
            </entry>
            <entry>
              <key type="string" value="type" />
              <val type="numeric" value="5" />
            </entry>
            <entry>
              <key type="string" value="name" />
              <val type="string" value="Number of Entries" />
            </entry>
          </item>
          <item type="dict" id="173546324" >
            <entry>
              <key type="string" value="access" />
              <val type="string" value="rw" />
            </entry>
            <entry>
              <key type="string" value="pdo" />
              <val type="False" value="" />
            </entry>
            <entry>
              <key type="string" value="type" />
              <val type="numeric" value="2" />
            </entry>
            <entry>
              <key type="string" value="name" />
              <val type="string" value="Storage Format for Node %d[(sub)]" />
            </entry>
            <entry>
              <key type="string" value="nbmax" />
              <val type="numeric" value="127" />
            </entry>
          </item>
        </val>
      </entry>
      <entry>
        <key type="string" value="name" />
        <val type="string" value="Storage Format" />
      </entry>
      <entry>
        <key type="string" value="struct" />
        <val type="numeric" value="7" />
      </entry>
    </val>
  </entry>
  <entry>
    <key type="numeric" value="7970" />
    <val type="dict" id="173552476" >
      <entry>
        <key type="string" value="need" />
        <val type="False" value="" />
      </entry>
      <entry>
        <key type="string" value="values" />
        <val type="list" id="172253484" >
          <item type="dict" id="173552884" >
            <entry>
              <key type="string" value="access" />
              <val type="string" value="ro" />
            </entry>
            <entry>
              <key type="string" value="pdo" />
              <val type="False" value="" />
            </entry>
            <entry>
              <key type="string" value="type" />
              <val type="numeric" value="5" />
            </entry>
            <entry>
              <key type="string" value="name" />
              <val type="string" value="Number of Entries" />
            </entry>
          </item>
          <item type="dict" id="173552748" >
            <entry>
              <key type="string" value="access" />
              <val type="string" value="rw" />
            </entry>
            <entry>
              <key type="string" value="pdo" />
              <val type="False" value="" />
            </entry>
            <entry>
              <key type="string" value="type" />
              <val type="numeric" value="15" />
            </entry>
            <entry>
              <key type="string" value="name" />
              <val type="string" value="Concise DCF for Node %d[(sub)]" />
            </entry>
            <entry>
              <key type="string" value="nbmax" />
              <val type="numeric" value="127" />
            </entry>
          </item>
        </val>
      </entry>
      <entry>
        <key type="string" value="name" />
        <val type="string" value="Concise DCF" />
      </entry>
      <entry>
        <key type="string" value="struct" />
        <val type="numeric" value="7" />
      </entry>
    </val>
  </entry>
</attr>
<attr name="ProfileName" type="string" value="None" />
<attr name="Type" type="string" value="master" />
<attr name="ID" type="numeric" value="0" />
<attr name="Name" type="string" value="MasterNode" />
</PyObject>