Skip to content

Conversation

RI0
Copy link
Contributor

@RI0 RI0 commented Nov 9, 2014

Is this what you wanted?

RI0 added 3 commits November 9, 2014 17:30
Default colorset in English
French colorset
Spanish - to improve
@docprofsky
Copy link
Collaborator

This looks good, now the code that displays the webpage needs to be updated.

@docprofsky
Copy link
Collaborator

Could you add more descriptive branch and issue names than "Patch 5" for this something like "Add translations for color names" for the issue name and "translate_colors" for the branch name would be easier to keep track of.

@RI0
Copy link
Contributor Author

RI0 commented Nov 10, 2014

That is a good idea. I have never done this before. Thank you

@techninja techninja changed the title Patch 5 PR: Add i18n translations to colorsets Nov 10, 2014
@techninja
Copy link
Contributor

Fixes needed here:

  • Translations for a color set should go into an i18n folder inside the color set folder
  • These JSON files are supposed to be in the format of a translation file, but right now they're just copies of the original (but translated). We need something closer to a translation key format, like this:
{
  "_meta": {
    "creator": "techninja",
    "target": "en-US",
    "release": "0.9.0",
    "basetype": "colorset"
  },
  "info": {
    "type": "Generic",
    "name": "Standard",
    "description": "English text describing this colorset"
  },
  "colors": {
    "black": "Black",
    "red": "Red",
    "orange": "Orange",
    "yellow": "Yellow",
    "green": "Green",
    "blue": "Blue",
    "purple": "Purple",
    "brown": "Brown"
  }
}
  • THEN we need to change out all the English text within the colorset JSON file with translation strings, like info.type & colors.black.

This seems like it might have issues, but if anything, it's likely a good start.

_EDIT_: And oh yea, this can't get merged into RoboPaint master without the code to handle colorset translations, otherwise colorset output would be totally broken! @rogerfachini might be able to help with that.

@rogerfachini
Copy link
Collaborator

I will work on adding the colorset translation code when I get home from school.

@techninja techninja added this to the 0.9.5 milestone Nov 13, 2014
@rogerfachini
Copy link
Collaborator

@RI0, the format that the files need to be for my code to work is the following. The outline that techninja gave for the JSON files above should be followed, and you can copy the translated word into the rightmost value on a line. The leftmost value (the 'key') we are undecided on, @techninja has a specific way he wants the keys to work, he might interject to let you know. in the colorset.json file in the colorset directory (for ex Generic.json) the value you replace the color with there is the full translation string in the format of ".colors.", for example "generic.colors.yellow". There is a working example of this in my fork here: https://github.com/rogerfachini/robopaint/tree/Colorsets-i18n/resources/colorsets/generic Have a look at generic.json and the i18n folder, let me know if you have any questions.

@techninja
Copy link
Contributor

I'm going to close this as Roger's #181 PR is handling all the hard parts. Good news is this will likely be done quite soon!

@techninja techninja closed this Nov 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants