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

Added the ability to set a Default Language from the Localization Editor #1290

Closed
wants to merge 4 commits into from

Conversation

ludonkey
Copy link
Contributor

You can see the thread (on the forum) about this feature here:
http://forum.spritebuilder.com/t/i18n-default-language/2723/4

The other pull request (into cocos2d to use this default language):
cocos2d/cocos2d-objc#1158

@cocojoe
Copy link
Member

cocojoe commented Jan 13, 2015

So thanks for this contribution it looks pretty good, couple of comments relating to usability.

The default dropdown has no default, as this doesn't currently exist 'none' as the ticked default option would be okay however probably makes more sense for 'English' to be default?

Optional
When you change the default setting to another language, it would be nice if this was reflected in the editor. So any localised labels etc instead of English defaulting would use the Language Editor default.

@ludonkey
Copy link
Contributor Author

As I'm sure that "None" doesn't exist as real language, I use this value to detect if the user doesn't want to set a default language OR if he want to remove it. I mean he could choose "Spanish" as default language and after he only wants to remove this default language setting -> he only needs to choose "None" and so no default language will appear into the file Strings.ccbLang. Just for information, if you remove a language, and this language is the default language, so the default language setting will be removed too (so it will display "None"). SO if we want to remove "None" and keep "English" as default value for the "default language" selector... we need to force the user to have the "English" language & translations (he won't be able to remove this language). I prefer to let the user choose his default language in the list of his existing languages & translations.

[Optional] -> Currently, all the localised labels (CCLabelTTF, CCLabelBMFont) in the scenes of sprite builder have the check box "Localize" to say it's localised labels. So the textFields (just above the check box "Localize") of these labels will always contain the translation keys (example: intro_mainTitle). So I guess you mean, IN THE PREVIEW AREA of the scene, if the label is localised, it would be great if instead of displaying the translation key it would display the default translation for this key. That's correct ?

@cocojoe
Copy link
Member

cocojoe commented Jan 13, 2015

Makes sense that 'None' is the default (and ticked) in dropdown. Issue was visually when you open the Language editor the selection is blank.

Yes on second part, for example I added a label HELLO_LABEL, localised it and it defaults to English regardless of settings. So it displays 'Hi', if I add Spanish and then change default language to be Spanish in settings. When I go back to Editor would be nice if that label changes to use the Spanish translation and displays 'Hola'

However appreciate the work you have done so far, I can always raise an Issue for the last part as an enhancement.

@cocojoe cocojoe self-assigned this Jan 13, 2015
…language when opening his project.

If the user changed the default language, use the new value to set the editor current language.
@ludonkey
Copy link
Contributor Author

Ok. I did the enhancement in my last commit ;)

@cocojoe
Copy link
Member

cocojoe commented Jan 13, 2015

Thanks, I'll check it again later.

…lank if the i18n editor was opened before to open the project.
@ludonkey
Copy link
Contributor Author

I identified and fixed: "Issue was visually when you open the Language editor the selection is blank."

@cocojoe
Copy link
Member

cocojoe commented Jan 14, 2015

Great excellent work, only one minor issue left :)

Expect (En) to be ticked in selector.

screenshot 2015-01-14 15 19 51

Expect (None) to be ticked in selector.

screenshot 2015-01-14 15 19 42

@ludonkey
Copy link
Contributor Author

Done :)

@cocojoe
Copy link
Member

cocojoe commented Jan 15, 2015

Excellent, works well now.

@vlidholt Please can you have a quick look over the UI changes to the Language Editor Window. Thanks

@cocojoe cocojoe closed this Sep 29, 2017
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.

None yet

2 participants