Ignore:
Timestamp:
2021-11-01T13:21:26+13:00 (2 years ago)
Author:
cstephen
Message:

Add macroniser scaffolding.
Update translations.

Location:
main/trunk/model-interfaces-dev/atea
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-interfaces-dev/atea

    • Property svn:ignore
      •  

        old new  
        1 node_modules
         1
  • main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/main.js

    r35508 r35714  
    160160else {
    161161    fetch("resources/interface_atea.properties")
    162         .then(async response => {
    163             const responseText = await response.text();
    164             const responseTranslations = responseText.split("\n");
     162        .then(
     163            async response => {
     164                const responseText = await response.text();
     165                const responseTranslations = responseText.split("\n");
    165166
    166             for (const translation of responseTranslations) {
    167                 const components = translation.split("=");
     167                for (const translation of responseTranslations) {
     168                    const keyvalue = translation.split("=");
    168169
    169                 if (components[0] === "") {
    170                     continue;
     170                    if (keyvalue.length !== 2) {
     171                        continue;
     172                    }
     173
     174                    const namespace = keyvalue[0].split(".");
     175                    if (namespace.length !== 3 || namespace[1] !== "asr") {
     176                        continue;
     177                    }
     178
     179                    translations.set(namespace[namespace.length - 1], keyvalue[1]);
    171180                }
    172181
    173                 const namespaceEndIndex = components[0].lastIndexOf(".");
    174                 translations.set(components[0].slice(namespaceEndIndex + 1), components.slice(1).join("="));
     182                store.commit("setTranslations", translations)
    175183            }
    176 
    177             store.commit("setTranslations", translations)
    178         });
     184        );
    179185}
Note: See TracChangeset for help on using the changeset viewer.