Open MagelaCE opened 2 years ago
Thank you!
On Sun, Feb 20, 2022, 8:31 AM Gerardo Magela Machado da Silva < @.***> wrote:
Here the JSON archive with update translations pt-BR.zip https://github.com/League-of-Foundry-Developers/compendium-browser/files/8104419/pt-BR.zip .
— Reply to this email directly, view it on GitHub https://github.com/League-of-Foundry-Developers/compendium-browser/issues/34, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSZYWUWREUZQ635DJ2LGWDU4EJN3ANCNFSM5O4TZGUQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
Sorry, I sent the file from the compendium folder, disregard the message
I did a slightly better translation (at the end of this post) but there's still a few strings that are not "translatable".
On the spell browser:
On the feature browser:
On the item browser:
On settings:
{
"CMPBrowser.compendiumBrowser":"Navegador de Compêndio",
"CMPBrowser.sortBy":"Classificar por",
"CMPBrowser.cr":"Nivel de Desafio",
"CMPBrowser.generalSettings":"Configurações Gerais",
"CMPBrowser.allowSpellAcc":"Permite o acesso dos jogadores ao navegador de magias",
"CMPBrowser.allowNpcAcc":"Permite o acesso dos jogadores ao navegador de NPCs",
"CMPBrowser.compSettingsSpell":"Configuração de Compêndio de Itens",
"CMPBrowser.compSettingsNpc":"Configuração de Compêndio de NPCs",
"CMPBrowser.load":"Carregar",
"CMPBrowser.lvl":"Nivel",
"CMPBrowser.ritual":"Ritual",
"CMPBrowser.concentration":"Concentração",
"CMPBrowser.verbal":"Verbal",
"CMPBrowser.somatic":"Somático",
"CMPBrowser.material":"Material",
"CMPBrowser.cantip":"Truque",
"CMPBrowser.school":"Escola",
"CMPBrowser.castingTime":"Custo de Ativação",
"CMPBrowser.bonusAction":"Ação bonus",
"CMPBrowser.reaction":"Reação",
"CMPBrowser.spellType":"Tipo da Magia",
"CMPBrowser.damageType":"Tipo de Dano",
"CMPBrowser.class":"Classe",
"CMPBrowser.artificer":"Artífice",
"CMPBrowser.bard":"Bardo",
"CMPBrowser.cleric":"Clérigo",
"CMPBrowser.druid":"Druida",
"CMPBrowser.paladin":"Paladino",
"CMPBrowser.ranger":"Guardião",
"CMPBrowser.sorcerer":"Feiticeiro",
"CMPBrowser.warlock":"Bruxo",
"CMPBrowser.wizard":"Mago",
"CMPBrowser.general":"Geral",
"CMPBrowser.components":"Componentes",
"CMPBrowser.hasSpells":"Tem Magias",
"CMPBrowser.hasLegAct":"Tem Ações Lendárias",
"CMPBrowser.hasLegRes":"Tem Resistência Lendária",
"CMPBrowser.creatureType":"Tipo de Criatura",
"CMPBrowser.aberration": "Aberração",
"CMPBrowser.beast": "Besta",
"CMPBrowser.celestial": "Celestial",
"CMPBrowser.construct": "Constructo",
"CMPBrowser.dragon": "Dragão",
"CMPBrowser.elemental": "Elemental",
"CMPBrowser.fey": "Feérico",
"CMPBrowser.fiend": "Ínfero",
"CMPBrowser.giant": "Gigante",
"CMPBrowser.humanoid": "Humanoide",
"CMPBrowser.monstrosity": "Monstruosidade",
"CMPBrowser.ooze": "Gosma",
"CMPBrowser.plant": "Planta",
"CMPBrowser.undead": "Morto-Vivo",
"CMPBrowser.abilities": "Atributos",
"CMPBrowser.dmgInteraction": "Interação do Dano",
"CMPBrowser.dmgDealt": "Dano Causado",
"CMPBrowser.size": "Tamanho",
"CMPBrowser.Tab.SpellBrowser":"Navegador de Magias",
"CMPBrowser.Tab.FeatBrowser": "Navegador de Características",
"CMPBrowser.Tab.ItemBrowser": "Navegador de Itens",
"CMPBrowser.Tab.NPCBrowser":"Navegador de NPC",
"CMPBrowser.Tab.Settings":"Configurações",
"CMPBrowser.SETTING.Maxload.NAME" : "Capacidade máxima",
"CMPBrowser.SETTING.Maxload.HINT" : "Número máximo de magias, talentos, itens ou NPCs a serem exibidos; para ver mais use os filtros. Essa configuração é usada para gerenciar memória e capacidade do servidor.",
"CMPBrowser.LOADING.Message" : "Carregando...{numLoaded} {itemType}s",
"CMPBrowser.LOADED.Message": "{numLoaded} {itemType}s carregados(as)",
"CMPBrowser.LOADED.MaxLoaded" : "(máximo exibido; para ver mais, use os filtros)",
"CMPBrowser.Filters.ResetFilters" : "Redefinir Filtros"
}
I created a PR to fixed most of the missed translations on my post above. I'm not a dev but I did some tests and I don't think I broke anything. #45
But I have some questions: 1) Every time I update this module, I have to change the cleanSpellName variable because by default it does not filter some spells in pt-br. I use something like this:
//original: let cleanSpellName = item.name.toLowerCase().replace(/[^一-龠ぁ-ゔァ-ヴーa-zA-Z0-9a-zA-Z0-9々〆〤]/g, '').replace("'", '').replace(/ /g, '');
let cleanSpellName = item.name.toLowerCase().replace(/\s/g, '').replace(/[àáâãäå]/g, "a").replace(/ç/g, "c").replace(/[èéêë]/g,"e").replace(/[ìíîï]/g,"i").replace(/[òóôõö]/g,"o").replace(/[ùúûü]/g,"u").replace(/['/-:]/g, '').replace(/ /g, '');
Some spells that do not get filtered otherwise: "Bolha Ácida" or "Bênção". Is there a solution?
2) On every update I overwrite the original "spell-classes.json", "item-packs.json" and "sub-classes.json" with a translated version I made. Is it possible to add them to the original one? Or too many spells names on the json could cause a problem? If it's ok, I could add them via PR as well.
Thanks! @spetzel2020 @joevaughan
Re your #2: can you clarify? I think that you're saying "after I update my own installation, I have to overwrite these files with translated versions" and therefore "is it possible to add the translated versions to the repository?"
If I am understanding correctly, then yes I think I can add them. However, what naming scheme would you recommend?
I suppose a more generic solution would be having i18n tags in the json files you mention, although that seems quite kludgy.
On Fri, Sep 23, 2022, 2:00 PM eduardopato41 @.***> wrote:
I created a PR to fixed most of the missed translations on my post above. I'm not a dev but I did some tests and I don't think I broke anything. #45 https://github.com/League-of-Foundry-Developers/compendium-browser/pull/45
But I have some questions:
- Every time I update this module, I have to change the cleanSpellName variable because by default it does not filter some spells in pt-br. I use something like this:
//original: let cleanSpellName = item.name.toLowerCase().replace(/[^一-龠ぁ-ゔァ-ヴーa-zA-Z0-9a-zA-Z0-9々〆〤]/g, '').replace("'", '').replace(/ /g, '');
let cleanSpellName = item.name.toLowerCase().replace(/\s/g, '').replace(/[àáâãäå]/g, "a").replace(/ç/g,"c").replace(/[èéêë]/g,"e").replace(/[ìíîï]/g,"i").replace(/[òóôõö]/g,"o").replace(/[ùúûü]/g,"u").replace("'", '').replace(/ /g, '');
Some spells that do not get filtered otherwise: "Bolha Ácida" or "Bênção". Is there a solution?
- On every update I overwrite the original "spell-classes.json", "item-packs.json" and "sub-classes.json" with a translated version I made. Is it possible to add them to the original one? Or too many spells names on the json could cause a problem? If it's ok, I could add them via PR as well.
Thanks! @spetzel2020 https://github.com/spetzel2020 @joevaughan https://github.com/joevaughan
— Reply to this email directly, view it on GitHub https://github.com/League-of-Foundry-Developers/compendium-browser/issues/34#issuecomment-1256674186, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSZYWW4V2TS5TL44BVAXOLV7YK5RANCNFSM5O4TZGUQ . You are receiving this because you were mentioned.Message ID: <League-of-Foundry-Developers/compendium-browser/issues/34/1256674186@ github.com>
I have a "spell-classes.json" file with 958 lines that includes spells in English and in Portuguese. I overwrite this file with the "original" that comes with the module. Here's the file in txt because github wont let me upload a json spell-classes.txt
For example, this is the same spell:
"bless": "cleric,paladin",
"bencao": "cleric,paladin",
Like I said, I'm not a dev I just dabble haha My solution was to put everything in the same json. Other than the generic solution you suggested maybe we could have a condition and create a different file for each language in a different folder? I don't know, but something like this:
if (language == pt-BR) {
this.classList = await fetch('modules/compendium-browser/spells-classes/pt-BR.json')
} else {
this.classList = await fetch('modules/compendium-browser/spells-classes/en.json')
}
But I don't know if you could detect the language used in Foundry. This could also solve the reformatting of the spell name (cleanSpellName). And my bad, I can understand English just fine but I'm terrible writing and speaking it haha
Here the JSON archive with update translations pt-BR.zip .