Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assets translation #118

Open
sharak opened this issue Aug 21, 2021 · 20 comments
Open

Assets translation #118

sharak opened this issue Aug 21, 2021 · 20 comments
Labels
🃏 feature: assets creation, management, and use of asset cards 🌐 topic: l10n relates to localization/internationalization

Comments

@sharak
Copy link
Contributor

sharak commented Aug 21, 2021

Hello.

I'm finishing translating the CORE file to spanish (with the new updates) and I see that the moves are loaded through a JSON file. As far as I can see, the same mechanics are not implemented for translating the assets (or the rest of the elements). Is something similar going to be implemented or do I just translate the compendiums with Babele? Or even easier, how should I translate the assets?

Thanks!

@ben
Copy link
Owner

ben commented Aug 21, 2021 via email

@sharak
Copy link
Contributor Author

sharak commented Aug 22, 2021

Hi Ben.

Do you know Babele? https://gitlab.com/riccisi/foundryvtt-babele

It is a module for Foundry that allows the translation of compendiums.

At first I was thinking of making a translation module through Babele. So you don't have to include a dependency in your project, since the dependency is only for translating.
But I saw the use that you make of the moves and the JSON files that you use for the importDatasworn function and i was not very sure the use that you want to make of the compendiums. If the assets, foes, etc., go through compendiums without any "magic" behind, I can translate them with Babele. But I didn't want to do it without first understanding your intentions with the assets.json, foes.json files and so on.

Thank you very much
Roberto

@aldarion-jdr
Copy link
Contributor

Hello Ben !
I'd like to translate your system in french.
I know already how to use Babele for Compendia but I couldn't find World's Truth.
Where xould they be accessible?

@em-squared
Copy link

Hi @aldarion-jdr the World's Truth content is translatable without babele: https://github.com/ben/foundry-ironsworn/blob/main/system/lang/en.json#L1004. Just add /lang/fr.json and reference it in system.json.

Let me know if you need help to translate Ironsworn system in french (I'm french too).

@jesberpen
Copy link
Contributor

@aldarion-jdr and @em-squared I've been translating the compendia to spanish using Babele, but I'm having some issues. On the assets, the checkmarks are gone, this one is easy to overlook in any case, but with the delve domains and themes, it seems that Babele breaks the rolling tables from the script. I've been trying different things with no success, have you managed to get it all working in French?

@ben the delve domains and themes localisation part of the main json file is it used anywhere? because I did a translation in the es.json file matching all the lines from the en.json but it doesn't seem to have an effect on the themes and domains.

@jesberpen
Copy link
Contributor

I've finished with the Babele translation, there are some issues as mentioned in my previous comment, but I managed to circumvent them, the solution is not perfect, but it works and you have the whole system in Spanish with the compendia. it should be up and running in foundry soon.
I've used the same es.json file from my babele module to update the one in this project too, as is the same, so in case someone doesn't want the compendia translated, at least the spanish one is up to date with the system version.

@aldarion-jdr
Copy link
Contributor

Hi guys,
Thanks for your replies !
I'm working on Starfinder's french translation in priority.
Though I started to work on the fr locale on the side.

I'll upload it asap after first tests on my PC.
@em-squared I'd really appriciate some help !

@sharak For now I don't intend to translate Delve Domains and I'm not working with Babele and compendia in Ironsworn yet.
Stil, I'm using it for Starfnder.
Did you use items' ids in reference or their names?
For checkmarks I use the HTML code, not some special character from windows or else. If you're talking about chekmark character of course, it might be a solution.

@aldarion-jdr
Copy link
Contributor

aldarion-jdr commented Jan 10, 2022

Hi guys !
First version of french locale is ready, how can I push it on your repo?
How do you proceeed?

Thanks for your help !

@ben
Copy link
Owner

ben commented Jan 10, 2022

To add a new translation file, you can make a PR that looks a lot like #14. For French, the file should probably be called fr.json.

@aldarion-jdr
Copy link
Contributor

I have the fr.json file but I can't create a PR :/

@aldarion-jdr
Copy link
Contributor

Hey @ben !
Sorry but it seems that I'm not authorized to create a pull request.
What can I do?

@ben
Copy link
Owner

ben commented Jan 23, 2022

Sorry for the delay. Can you upload it somewhere I can download it, and I'll do the integration?

@aldarion-jdr
Copy link
Contributor

Sure.
But it's odd that I'm not able to register a PR.

@rsek rsek added 🌐 topic: l10n relates to localization/internationalization 🃏 feature: assets creation, management, and use of asset cards labels Jun 25, 2022
@Yaushee
Copy link

Yaushee commented Nov 8, 2022

Hello,
I've started working on expanding the FR translation to other compendia items than the assets, through Babele.
I've taken both the FR and ES files as reference, however I'm not sure why the translation of the names from the moves is working, but not the description content. Especially since @jesberpen mentioned being able to translate everything to Spanish?

I'm guessing it's something to do with the mapping, but after looking into the system's innards and trying other things, I can't seem to fix it, as the system seems to point to data.description anyway.

image
image

image

I have very limited coding knowledge unfortunately, so any help would be appreciated.

@ben
Copy link
Owner

ben commented Nov 8, 2022

You're on the right track! The data you're looking at is for an older version of moves, though. The data layout changed to match Dataforged. The Face Danger move now includes the data pasted below. There are a bunch of fields, but here's a quick guide to how the ones you're concerned with are used:

  • Display.Title is used in the move-sheet sidebar as the name of the move (you've discovered that you can also remap name to get the same effect)
  • Text is the full description of the move, shown when you expand it in the move sheet. Markdown is supported here.
  • Trigger.Text is shown in the preroll dialog
  • Trigger.Options[].Text is used for the bullet points in the preroll dialog
  • Outcomes.*.Text are used in the chat-message output of a resolved roll

It's occurring to me that I should write a localization guide in the wiki. Anyways, here's the data for Face Danger, as grabbed from the db file:

{
  "_id": "e6ed148eff82c171",
  "name": "Face Danger",
  "type": "sfmove",
  "img": "icons/dice/d10black.svg",
  "data": {
    "dfid": "Starforged/Moves/Adventure/Face_Danger",
    "Category": "Starforged/Moves/Adventure",
    "Progress Move": false,
    "Variant of": "",
    "Text": "**When you attempt something risky or react to an imminent threat**, envision your action and roll. If you act...\n\n  * With speed, mobility, or agility: Roll +edge\n  * With resolve, command, or sociability: Roll +heart\n  * With strength, endurance, or aggression: Roll +iron\n  * With deception, stealth, or trickery: Roll +shadow\n  * With expertise, focus, or observation: Roll +wits\n\nOn a **strong hit**, you are successful. Take +1 momentum.\n\nOn a **weak hit**, you succeed, but not without a cost. Make a suffer move (-1).\n\nOn a **miss**, you fail, or a momentary success is undermined by a dire turn of events. @Compendium[foundry-ironsworn.starforgedmoves.78baa51694fe37c5]{Pay the Price}.",
    "Trigger": {
      "Text": "When you attempt something risky or react to an imminent threat...",
      "Options": [
        {
          "dfid": "Starforged/Moves/Adventure/Face_Danger/Trigger/Options/1",
          "Text": "With speed, mobility, or agility",
          "Roll type": "Action roll",
          "Method": "Any",
          "Using": ["Edge"]
        },
        {
          "dfid": "Starforged/Moves/Adventure/Face_Danger/Trigger/Options/2",
          "Text": "With resolve, command, or sociability",
          "Roll type": "Action roll",
          "Method": "Any",
          "Using": ["Heart"]
        },
        {
          "dfid": "Starforged/Moves/Adventure/Face_Danger/Trigger/Options/3",
          "Text": "With strength, endurance, or aggression",
          "Roll type": "Action roll",
          "Method": "Any",
          "Using": ["Iron"]
        },
        {
          "dfid": "Starforged/Moves/Adventure/Face_Danger/Trigger/Options/4",
          "Text": "With deception, stealth, or trickery",
          "Roll type": "Action roll",
          "Method": "Any",
          "Using": ["Shadow"]
        },
        {
          "dfid": "Starforged/Moves/Adventure/Face_Danger/Trigger/Options/5",
          "Text": "With expertise, focus, or observation",
          "Roll type": "Action roll",
          "Method": "Any",
          "Using": ["Wits"]
        }
      ],
      "dfid": "Starforged/Moves/Adventure/Face_Danger/Trigger"
    },
    "Outcomes": {
      "Strong Hit": {
        "Text": "You are successful. Take +1 momentum.",
        "dfid": "Starforged/Moves/Adventure/Face_Danger/Outcomes/Strong_Hit"
      },
      "Weak Hit": {
        "Text": "You succeed, but not without a cost. Make a suffer move (-1).",
        "dfid": "Starforged/Moves/Adventure/Face_Danger/Outcomes/Weak_Hit"
      },
      "Miss": {
        "Text": "You fail, or a momentary success is undermined by a dire turn of events. @Compendium[foundry-ironsworn.starforgedmoves.78baa51694fe37c5]{Pay the Price}.",
        "dfid": "Starforged/Moves/Adventure/Face_Danger/Outcomes/Miss"
      },
      "dfid": "Starforged/Moves/Adventure/Face_Danger/Outcomes"
    },
    "Oracles": [],
    "Source": {
      "Title": "Ironsworn: Starforged Rulebook",
      "Authors": ["Shawn Tomkin"],
      "Date": "050622",
      "Page": 147
    },
    "Suggestions": {},
    "Name": "Face Danger",
    "Optional": false,
    "Display": { "Title": "Face Danger", "Color": "#3C70A4" }
  },
  "effects": [],
  "folder": null,
  "sort": 0,
  "permission": { "default": 0, "gXcI9ebHCY1jasJg": 3 },
  "flags": {}
}

@ben
Copy link
Owner

ben commented Nov 8, 2022

Bingo! https://github.com/ben/foundry-ironsworn/wiki/Localization Let me know if there's anything missing there and I'll try to make it more clear.

@Yaushee
Copy link

Yaushee commented Nov 9, 2022

Thank you for your help!

Would it look something like that then, if I'm understanding the structure correctly?

{
	"label": "Ironsworn - Actions",
	"mapping": {
		"description": "data.Text",
		"trigger": "data.Trigger.Text",
		"strong": "data.Outcomes.Strong Hit.Text",
		"weak": "data.Outcomes.Weak Hit.Text",
		"miss": "data.Outcomes.Miss.Text"
	},

Because... That's not working xD (without data. either)
Only the name gets translated still...

@ben
Copy link
Owner

ben commented Nov 9, 2022

🤔 According to what I'm reading on the babele site, that should work. One thing I'd recommend is taking the move sheet out of the equation, and opening up the moves compendium directly. If it works there but not in the system UI, then you can at least keep moving while I fix my issues.

@Yaushee
Copy link

Yaushee commented Nov 9, 2022

Yep, unlocking the compendia and editing the moves directly in Foundry works at least! (the move sheet is updated after a reload).

In the meantime, I've updated the fr.json global translation, if you wanna include it in the next update! I don't really know how to create a pull request (if it's the right term) but I uploaded it here: main...Yaushee:foundry-ironsworn:main

Fixes:

  • Grammar inaccuracies/errors
  • Added spaces before "! ? :" to match French syntax
  • Some missing "s"
  • Changed a few terms to better correspond to their meaning and intent
  • Added some translations to Delve content

There's still a lot of Delve content that's untranslated, but that's something at least :)

@aldarion-jdr
Copy link
Contributor

Hello everyone !
Thanks for your help Yaushee !
If you want to create a pull request you'll need to "fork" the system on your Github and upload your updated file there.
After that you will be able to create a Pull Request on Ben's Ironworn system repository that will check all diffrences.
Ben will then have a notification for its validation. And "voilà".

Here you'll find all the details you'll need :
https://docs.github.com/en/get-started/quickstart/fork-a-repo
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork

I have a lot of work prepared and done on compendiums, if you'd like to help you'll be welcomed !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🃏 feature: assets creation, management, and use of asset cards 🌐 topic: l10n relates to localization/internationalization
Projects
None yet
Development

No branches or pull requests

7 participants