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

Initial objectives dialogue does not honour Wesnoth language selection #4505

Open
Wedge009 opened this issue Oct 22, 2019 · 4 comments

Comments

@Wedge009
Copy link
Member

@Wedge009 Wedge009 commented Oct 22, 2019

Game and System Information

1.14.9 release on Windows (though I expect this to be an issue on master and 1.14 on any OS)

Describe the bug

Low priority, since players are unlikely to change languages that frequently. Loading a save game that was saved under a certain language will always initially display the objectives dialogue in that language.

To reproduce

  1. Start any scenario with objectives
  2. Save the game
  3. Return to main menu
  4. Change language selection
  5. Reload the game from step 2
  6. Note that objectives dialogue is in the original saved language
  7. Close and re-open objectives dialogue and note the language is now what was selected in step 4

Expected behaviour

Initial display of objectives dialogue should be in the currently selected language (assuming translated text is available). I think this is reasonable even if the file name is in the original language.

@Wedge009

This comment has been minimized.

Copy link
Member Author

@Wedge009 Wedge009 commented Oct 22, 2019

Forgot to mention something similar, albeit for MP: #3375

@shikadiqueen

This comment has been minimized.

Copy link
Member

@shikadiqueen shikadiqueen commented Nov 5, 2019

Both this and #3375 appear to be linked to the fact that if you look into the save file, you'll find that [side] has an objectives attribute with the full marked-up text that would normally be displayed by the dialog. Of course that massive text mosaic is not a translatable string, although it could be if it was generated a bit differently.

@Wedge009

This comment has been minimized.

Copy link
Member Author

@Wedge009 Wedge009 commented Nov 5, 2019

I had a feeling it might be to do with translated text in the save data.

@CelticMinstrel

This comment has been minimized.

Copy link
Member

@CelticMinstrel CelticMinstrel commented Nov 15, 2019

I think it might not be possible to make that massive text mosaic be a translatable string, since it uses wesnoth.format (unless someone can think of a way to store formatting strings and their arguments into the translatable string in a way that allows reformatting for a new language on the fly).

On the other hand, I wonder if calling generate_objectives from here would fix it: https://github.com/wesnoth/wesnoth/blob/master/data/lua/wml/objectives.lua#L21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.