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
Right now, the logic that finds the 'resources' object to insert or update key/values in is pretty tied to the structure in the README (ie, the literal initializer that is passed to LocalizationUtils.cultureFactory(...)
On a client project that this extension was primarily based off of, we recently got the first professionally translated file back and had to import the data. In an effort to keep future translation files smaller (sending over only the new or updated copy), we moved all of the keys and values that had changed into another object above the literal object that is passed to LocalizationUtils.cultureFactory(...).
This issue should investigate ways to ease the specificity of which object is pulled for inserting/updating keys. Perhaps the first literal object that has the key (if updating) or the last literal object (if adding). There may be an opportunity for a configuration setting to add control for this, too, though I'm not sure there's a use case other than the one described.
Example:
import{BaseSpanishSpain,Culture}from"andculturecode-javascript-core";importCultureResourcesfrom"utilities/interfaces/culture-resources";importLocalizationUtilsfrom"utilities/localization-utils";constProfessionallyTranslatedSpanishSpain={"aboutApp": "Acerca de {{appName}}","acceptGroupInvitation-invitedByNameToJoin": "{{byName}} te invitó {{toJoin}}","acceptGroupInvitation-invitedToJoin": "Has sido invitado {{toJoin}}",// ..."warnings-thisActionCannotBeUndone": "Esta acción no se puede deshacer.","yellow": "Amarillo","yesAction": "Sí, {{action}}","you": "Tú","yourItem": "Su {{item}}",};constSpanishSpain: Culture<CultureResources>=LocalizationUtils.cultureFactory(BaseSpanishSpain,{resources: {
...ProfessionallyTranslatedSpanishSpain,"admin": "Administración","all": "todas","allOfItem": "Todo {{item}}","clearAll": "Limpiar todo",// ..."support-otherFormsOfContact_answer": "<0>Nuestro equipo de atención al cliente está disponible para ayudarlo {{supportHours}}. Si está fuera de nuestro horario comercial, envíenos un correo electrónico a <3></3> Y le responderemos en nuestro próximo día hábil.</0><1><strong>Teléfono</strong></1><2><0></0> (U.S. & Canada)</2><3><0>{{altPhone}}</0> (U.S. & Canada)</3><4><0></0> (Internacional)</4><5><0>{{mxPhone}}</0> (México)</5>","support-otherFormsOfContact": "Otras formas de contacto.","updatedItem": "Actualizado {{item}}.","userRole": "rol del usuario",},});exportdefaultSpanishSpain;
The text was updated successfully, but these errors were encountered:
Right now, the logic that finds the 'resources' object to insert or update key/values in is pretty tied to the structure in the README (ie, the literal initializer that is passed to
LocalizationUtils.cultureFactory(...)
On a client project that this extension was primarily based off of, we recently got the first professionally translated file back and had to import the data. In an effort to keep future translation files smaller (sending over only the new or updated copy), we moved all of the keys and values that had changed into another object above the literal object that is passed to
LocalizationUtils.cultureFactory(...)
.This issue should investigate ways to ease the specificity of which object is pulled for inserting/updating keys. Perhaps the first literal object that has the key (if updating) or the last literal object (if adding). There may be an opportunity for a configuration setting to add control for this, too, though I'm not sure there's a use case other than the one described.
Example:
The text was updated successfully, but these errors were encountered: