On 8/29/09, Matthew Toseland <toad at amphibian.dyndns.org> wrote:
> f6641d239aa769b49ea77366ed0c196e8fbef1e3
>
>
>
>         private static class L10nCallback extends StringCallback implements
> EnumerableOptionCallback {
>                 @Override
>                 public String get() {
> -                       return L10n.getSelectedLanguage().fullName;
> +                       return
> NodeL10n.getBase().getSelectedLanguage().fullName;
>                 }
>
>                 @Override
>                 public void set(String val) throws
> InvalidConfigValueException {
>                         if(val == null || get().equalsIgnoreCase(val))
> return;
>                         try {
> -                               L10n.setLanguage(val);
> +                               new
> NodeL10n(BaseL10n.LANGUAGE.mapToLanguage(val));
>                         } catch (MissingResourceException e) {
>                                 throw new
> InvalidConfigValueException(e.getLocalizedMessage());
>                         }
> -
> PluginManager.setLanguage(L10n.getSelectedLanguage());
> +
> PluginManager.setLanguage(NodeL10n.getBase().getSelectedLanguage());
>                 }
>
>                 public String[] getPossibleValues() {
> -                       return L10n.LANGUAGE.valuesWithFullNames();
> +                       return BaseL10n.LANGUAGE.valuesWithFullNames();
>                 }
>         }
>
>
> Don't understand the set() process??
>
>
> -                       L10n.setLanguage(nodeConfig.getString("l10n"));
> +                       new
> NodeL10n(BaseL10n.LANGUAGE.mapToLanguage(nodeConfig.getString("l10n")));
>
>
>
>
> BaseL10n: do the chinese language names show up?
>
>
>
>
> +       /**
> +        * Get the full base name of the L10n override file used by the
> current language.
> +        * @return String
> +        */
> +       public String getL10nOverrideFileName() {
> +               return this.l10nFilesBasePath +
> this.l10nOverrideFilesMask.replace("${lang}", this.lang.shortCode);
> +       }
> +
>
>
> Doesn't make sense, the override file is not in the jar, it is in the
> current working directory. It is a separate file, outside of the node.
>
> Have you actually tested the override functions? Setting a key and saving
> the override file and loading it back in on restart?
>
>
> -                       Logger.error(CLASS_NAME, "Error while saving the
> translation override: "+ e.getMessage(), e);
> +                       Logger.error(this.getClass(), "Error while saving
> the translation override: " + e.getMessage(), e);
>
>
> Just use Logger.error(this, ...)
>
>
> Why do you remove the synchronization? The "if(fallback = null) load
> fallback" does need to be synchronized or we will have many copies of it
> loaded simultaneously early on.
>
> QueueToadlet imports NodeL10n twice.
>
>
>
> 42e6de62a207602e6b254ce3a14ab3d2caa3240d
>
>
> [19:38:23] <toad_> Artefact2: please do not add GPL headers to existing
> files
> [19:38:39] <toad_> Artefact2: we do not know whether everyone who has
> contributed to the file has consented to GPL-2-or-later
>
>
> getStore() : since we have the plugin already, why not just call
> plugin.getClass().toString() instead of passing in the identifier?
>
>
> getStore:
> container.ext().configure().objectClass(storeC.pluginStore.getClass()).cascadeOnDelete(true);
> - this MUST occur in Node with the other db4o config, NOT here.
>
> container.ext().store(storeC, Integer.MAX_VALUE);
> - you are storing the example! there may be an existing PluginStore, you
> must query for it and modify and store it if there is one.
>
>
> +     public HashMap<String, Byte[]> bytesArrays = new HashMap<String,
> Byte[]>();
> - ewwww! If you can't do a HashMap<String, byte[]> (which IIRC you can), do
> a HashMap<String, ByteArrayWrapper>.

Everything fixed in cefa2e74a105585200098e0f325ee46ff180e70d.

Reply via email to