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

Language files in Game Script tars are not detected by OpenTTD (other than english.txt) #5509

Closed
DorpsGek opened this issue Mar 18, 2013 · 1 comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Zuu opened the ticket and wrote:

To reproduce:

  1. Download the attached GS tar.
  2. Put it in /game/
  3. Start OpenTTD
  4. Select LangTest as Game Script
  5. Select Swedish or German as language
  6. Start a new game (preferable in single player as the LangTest GS was coded for single player usage)

Expected behaviour:
- The expected behaviour is that the GS should crash and complain that it cannot find STR_HELLO_WORLD. (because swedish.txt contain some non-UTF characters)
- (With German selected it may either crash or display a news message in google-translated German)
- Note: with correctly UTF8 encoded language files, of course the expected behaviour is that the translations should show correctly.

Current behaviour in OpenTTD (1.2.3, 1.3-testing and trunk):
- OpenTTD shows a news message "Hello and welcome {COMPANY}!" even if Swedish or German is selected as language in the game options.

---------

The reason for this bug appears to be because LanguageScanner in src/game/game_text.cpp uses a FileScanner::Scan overload version that doesn't look inside tar files. There is a FileScanner::Scan version that can look inside tars but it doesn't accept arbitrary sub directories.

Attachments

Reported version: 1.2.3
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/5509
@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Fixed

in r25114


This comment was imported from FlySpray: https://bugs.openttd.org/task/5509

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant