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

French and German translation from original games #304

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

nico0885
Copy link

I made some changes to the code to support French and German texts along with English ones.

I used original translation from the games officially released in French and German. As such the text which is specific to SDLPoP is not translated.

I also made some minor changes to fix some GCC warning, and to use cmake under Linux.

nico0885 added 7 commits May 11, 2023 22:03
Added a root CMakeLists.txt to display all data in the C editor
Added D_GNU_SOURCE=1 to CMakeList.txt to avoid crash
Also fixed potential unitialized variable "save_path"

Message from GCC below :

warning: the comparison will always evaluate as ‘true’ for the address
of ‘save_path’ will never be NULL [-Waddress]
     2387 |         if (save_path != NULL && save_path[0] != '\0') {
note:
    ‘save_path’ declared here
     2378 |         char save_path[POP_MAX_PATH];
Very unlikely to overflow, but fixes the warning

GCC warning below :

warning: ‘snprintf’ output may be truncated before the last format
character [-Wformat-truncation=]
      746 |                 snprintf(time_text, sizeof(time_text), "%d:
%02d", minutes, seconds);

‘snprintf’ output between 5 and 13 bytes into a destination of size 12
      746 |                 snprintf(time_text, sizeof(time_text), "%d:
%02d", minutes, seconds);
types.h : missing definition of POP_MAX_PATH
proto.h : missing header guard
proto.h : missing several definition (added #include "common.h")
This commit adds the texts from the official German and French release.

The translation concerns :
- Texts at the beginning and the end of the game
- In game texts (usually displayed at the bottom of the screen).

A parameter has been added to SDLPoP.ini to select language. It sets a
global variable "pop_language".

Images were added :
- in TITLE (Texts at the beginnig anf at the end of the game).
- in fonts (additional characters required for French and German texts)

A directory dedicated to translation was added :
- legacy_ingame_texts : contains English, German and French texts
- non_ascii_code : function to deal with additional characters in fonts
directory (non ascii)

Other changes :
- The box used for bottom texts was enlarged to display the longest
German text "KNOPFDRUCK ZUM WEITERSPIELEN"
Added transparency to French and German translation images used for
introduction and ending (in the TITLE directory) for constitency with
English version
@bitigchi
Copy link

Paging: #130

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.

2 participants