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

Commit an Italian translation by Jack Lemon. #205

Merged
merged 1 commit into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
368 changes: 360 additions & 8 deletions SonicTimeTwisted.gmx/SonicTimeTwisted.project.gmx

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion SonicTimeTwisted.gmx/datafiles/translations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ English
French
Russian
BrazilianPortuguese
Ukrainian
Ukrainian
Italian
394 changes: 394 additions & 0 deletions SonicTimeTwisted.gmx/datafiles/translations/Italian.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 18 additions & 2 deletions SonicTimeTwisted.gmx/objects/objSSScoreCard.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,22 @@ if(
next_message = true;
}

// do we have the %break format character?
if (string_count("%b", super_title_line2) > 0) {
// here we just get rid of the character entirely.
super_title_line2 = string_replace(super_title_line2, "%b", "");
var _bpos = string_pos("%b", super_title_line2_player_overlay) + string_length("%b");
var _bend = string_length(super_title_line2_player_overlay) - (_bpos - 1);
super_title_line2_player_overlay = string_copy(super_title_line2_player_overlay, _bpos, _bend);
show_debug_message("Found %break format character.");
show_debug_message("overlay=" + super_title_line2_player_overlay);
}

// italian and german shenanigans
name_offsetx = string_width(string_copy(line1, 1, string_pos(name_tag, line1) - 1));
sline1_offsetx = string_width(string_copy(super_title_line1, 1, string_pos(super_title_line1_player_overlay, super_title_line1) - 1));
sline2_offsetx = string_width(string_copy(super_title_line2, 1, string_pos(super_title_line2_player_overlay, super_title_line2) - 1));
//next_message = true;
</string>
</argument>
</arguments>
Expand Down Expand Up @@ -389,9 +405,9 @@ if(state &gt;= 6)
// text
draw_set_font(objResources.fontTitleSmallest);
draw_text_color(round(draw_x_offset+title_ox1 - title_offset1), draw_y_offset_title + 56, super_title_line1,c_white,c_white,c_gray,c_gray,1);
draw_text_color(round(draw_x_offset+title_ox1 - title_offset1), draw_y_offset_title + 56, super_title_line1_player_overlay,c_white,c_white,title_color,title_color,1);
draw_text_color(round(draw_x_offset+title_ox1 - title_offset1 + sline1_offsetx), draw_y_offset_title + 56, super_title_line1_player_overlay,c_white,c_white,title_color,title_color,1);
draw_text_color(round(draw_x_offset+title_ox2 + title_offset2), draw_y_offset_title + 74, super_title_line2,c_white,c_white,c_gray,c_gray,1);
draw_text_color(round(draw_x_offset+title_ox2 + title_offset2), draw_y_offset_title + 74, super_title_line2_player_overlay,c_white,c_white,title_color,title_color,1);
draw_text_color(round(draw_x_offset+title_ox2 + title_offset2 + sline2_offsetx), draw_y_offset_title + 74, super_title_line2_player_overlay,c_white,c_white,title_color,title_color,1);
}
else
{
Expand Down
4 changes: 3 additions & 1 deletion SonicTimeTwisted.gmx/objects/objScoreCard.object.gmx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ else
digits_perfect_bonus = 0;
}
digits_total_bonus = string_length(string(expected_total_bonus));
// italian and german shenanigans
name_offsetx = string_width(string_copy(line1, 1, string_pos(name_tag, line1) - 1));
</string>
</argument>
</arguments>
Expand Down Expand Up @@ -517,7 +519,7 @@ draw_set_valign(fa_top);
draw_set_halign(fa_left);
draw_set_font(objResources.fontTitleSmallest);
draw_text_color(round(draw_x_offset+title_ox1 - title_offset1), draw_y_offset_title + 56, line1,c_white,c_white,c_gray,c_gray,1);
draw_text_color(round(draw_x_offset+title_ox1 - title_offset1), draw_y_offset_title + 56, name_tag,c_white,c_white,title_color,title_color,1);
draw_text_color(round(draw_x_offset+title_ox1 - title_offset1 + name_offsetx), draw_y_offset_title + 56, name_tag,c_white,c_white,title_color,title_color,1);
draw_text_color(round(draw_x_offset+title_ox2 + title_offset2), draw_y_offset_title + 74, line2,c_white,c_white,c_gray,c_gray,1);
draw_set_halign(fa_right);
draw_set_font(objResources.fontHud);
Expand Down
8 changes: 7 additions & 1 deletion SonicTimeTwisted.gmx/scripts/tr_load_localized_sprite.gml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
///tr_load_file(fname, imgnumb, removeback, smooth, xorig, yorig)
///tr_load_localized_sprite(fname, imgnumb, removeback, smooth, xorig, yorig)

// returns -1 if no sprite is found, because false/0 can in fact match a sprite

Expand All @@ -8,5 +8,11 @@ show_debug_message("Loading sprite " + _path);

if (!file_exists(_path)) return -1;

// these two arguments are leftovers from legacy GM, since it had no alpha channel whatsoever.
// in Studio these only work properly for 24bit PNGs, and like, who's even using them anyways?
if (argument2 || argument3) {
show_error("Ahem, using removeback or smooth WILL cause issues in GMStudio and above.", true);
}

return sprite_add(_path, argument1, argument2, argument3, argument4, argument5);

4 changes: 2 additions & 2 deletions SonicTimeTwisted.gmx/scripts/tr_load_localized_sprites.gml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ with(objResources)
{
sprite_delete(timePostPastSprite);
}
timePostPastSprite = tr_load_localized_sprite('sprPastPost', 6, true, false, 16, 51);
timePostPastSprite = tr_load_localized_sprite(sprite_get_name(sprPastPost), sprite_get_number(sprPastPost), false, false, sprite_get_xoffset(sprPastPost), sprite_get_yoffset(sprPastPost));

if(sprite_exists(timePostFutureSprite))
{
sprite_delete(timePostFutureSprite);
}
timePostFutureSprite = tr_load_localized_sprite('sprFuturePost', 6, true, false, 16, 51);
timePostFutureSprite = tr_load_localized_sprite(sprite_get_name(sprFuturePost), sprite_get_number(sprFuturePost), false, false, sprite_get_xoffset(sprFuturePost), sprite_get_yoffset(sprFuturePost));
}


11 changes: 11 additions & 0 deletions extras/fonts/presets/it.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<preset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="preset.xsd">
<font name="fontHud"><![CDATA[ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀÉÈÌÒÙàèìòùéó]]></font>
<font name="fontHudMin"><![CDATA[ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀÉÈÌÒÙàèìòùéó]]></font>
<font name="fontLives"><![CDATA[ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀÉÈÌÒÙàèìòùéó]]></font>
<font name="fontMicro"><![CDATA[ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀÉÈÌÒÙàèìòùéó]]></font>
<font name="fontMicroBackup"><![CDATA[ ]]></font>
<font name="fontTitleLarge"><![CDATA[ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'ÀÉÈÌÒÙàèìòùéó]]></font>
<font name="fontTitleSmall"><![CDATA[ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'ÀÉÈÌÒÙàèìòùéó]]></font>
<font name="fontTitleSmallest"><![CDATA[ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'ÀÉÈÌÒÙàèìòùéó]]></font>
</preset>