Skip to content

Commit

Permalink
Merge pull request #42 from dyxxzgc/master
Browse files Browse the repository at this point in the history
Add Simplified Chinese translation
  • Loading branch information
qrrk authored Mar 9, 2022
2 parents 52a6d28 + 28df5e3 commit 54d448f
Show file tree
Hide file tree
Showing 18 changed files with 602 additions and 417 deletions.
4 changes: 3 additions & 1 deletion fonts/OpenSans-Italic.tres
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[gd_resource type="DynamicFont" load_steps=3 format=2]

[ext_resource path="res://fonts/OpenSans-Italic.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://fonts/SourceHanSansCN-Regular.otf" type="DynamicFontData" id=2]

[resource]
size = 13
use_filter = true
extra_spacing_top = -3
extra_spacing_bottom = -3
font_data = ExtResource( 1 )
fallback/0 = ExtResource( 2 )
4 changes: 3 additions & 1 deletion fonts/OpenSans-Regular.tres
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[gd_resource type="DynamicFont" load_steps=3 format=2]

[ext_resource path="res://fonts/OpenSans-Regular.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://fonts/SourceHanSansCN-Regular.otf" type="DynamicFontData" id=2]

[resource]
size = 13
use_filter = true
extra_spacing_top = -3
extra_spacing_bottom = -3
font_data = ExtResource( 1 )
fallback/0 = ExtResource( 2 )
4 changes: 3 additions & 1 deletion fonts/OpenSans-Semibold.tres
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[gd_resource type="DynamicFont" load_steps=3 format=2]

[ext_resource path="res://fonts/OpenSans-Semibold.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://fonts/SourceHanSansCN-Regular.otf" type="DynamicFontData" id=2]

[resource]
size = 13
use_filter = true
extra_spacing_top = -3
extra_spacing_bottom = -3
font_data = ExtResource( 1 )
fallback/0 = ExtResource( 2 )
4 changes: 3 additions & 1 deletion fonts/OpenSans-SemiboldItalic.tres
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[gd_resource type="DynamicFont" load_steps=3 format=2]

[ext_resource path="res://fonts/OpenSans-SemiboldItalic.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://fonts/SourceHanSansCN-Regular.otf" type="DynamicFontData" id=2]

[resource]
size = 13
use_filter = true
extra_spacing_top = -3
extra_spacing_bottom = -3
font_data = ExtResource( 1 )
fallback/0 = ExtResource( 2 )
Binary file added fonts/SourceHanSansCN-Regular.otf
Binary file not shown.
96 changes: 96 additions & 0 deletions fonts/licenses/AdobeSource.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font
Name 'Source'. Source is a trademark of Adobe in the United States
and/or other countries.

This Font Software is licensed under the SIL Open Font License,
Version 1.1.

This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL

-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to,
deleting, or substituting -- in part or in whole -- any of the
components of the Original Version, by changing formats or by porting
the Font Software to a new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed,
modify, redistribute, and sell modified and unmodified copies of the
Font Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created using
the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file added icons/lang_zh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions icons/lang_zh.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/lang_zh.png-b240779af2df94a9620d449f8c7a7161.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://icons/lang_zh.png"
dest_files=[ "res://.import/lang_zh.png-b240779af2df94a9620d449f8c7a7161.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
4 changes: 2 additions & 2 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ theme/use_hidpi=true

[locale]

translations=PoolStringArray( "res://text/text.en.translation", "res://text/text.ru.translation", "res://text/tips.en.translation", "res://text/tips.ru.translation", "res://text/font_info.en.translation", "res://text/font_info.ru.translation" )
locale_filter=[ 1, [ "en", "ru" ] ]
translations=PoolStringArray( "res://text/text.en.translation", "res://text/text.ru.translation", "res://text/tips.en.translation", "res://text/tips.ru.translation", "res://text/font_info.en.translation", "res://text/font_info.ru.translation", "res://text/font_info.zh.translation", "res://text/text.zh.translation", "res://text/tips.zh.translation" )
locale_filter=[ 0, [ "en", "ru", "zh" ] ]

[physics]

Expand Down
5 changes: 3 additions & 2 deletions scenes/Catapult.tscn
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[gd_scene load_steps=35 format=2]
[gd_scene load_steps=36 format=2]

[ext_resource path="res://icons/info.svg" type="Texture" id=1]
[ext_resource path="res://icons/download.svg" type="Texture" id=2]
[ext_resource path="res://icons/play.svg" type="Texture" id=3]
[ext_resource path="res://scripts/Catapult.gd" type="Script" id=4]
[ext_resource path="res://scripts/ReleaseManager.gd" type="Script" id=5]
[ext_resource path="res://scripts/InstallProbe.gd" type="Script" id=6]
[ext_resource path="res://icons/lang_zh.png" type="Texture" id=7]
[ext_resource path="res://scripts/SettingsUI.gd" type="Script" id=8]
[ext_resource path="res://scripts/ReleaseInstaller.gd" type="Script" id=9]
[ext_resource path="res://scripts/DownloadManager.gd" type="Script" id=10]
Expand Down Expand Up @@ -952,7 +953,7 @@ size_flags_horizontal = 10
text = "English"
icon = ExtResource( 35 )
expand_icon = true
items = [ "English", ExtResource( 35 ), false, 0, null, "Русский", ExtResource( 36 ), false, 1, null ]
items = [ "English", ExtResource( 35 ), false, 0, null, "Русский", ExtResource( 36 ), false, 1, null, "简体字", ExtResource( 7 ), false, 2, null ]
selected = 0

[node name="ShowGameDesc" type="CheckButton" parent="Main/Tabs/Settings"]
Expand Down
4 changes: 4 additions & 0 deletions scripts/SettingsUI.gd
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ func _ready() -> void:
lang_list.selected = 0
"ru":
lang_list.selected = 1
"zh":
lang_list.selected = 2

$ShowGameDesc.pressed = _settings.read("show_game_desc")
$PrintTips.pressed = _settings.read("print_tips_of_the_day")
Expand Down Expand Up @@ -65,6 +67,8 @@ func _on_obtnLanguage_item_selected(index: int) -> void:
locale = "en"
1:
locale = "ru"
2:
locale = "zh"
_settings.store("launcher_locale", locale)


Expand Down
14 changes: 7 additions & 7 deletions text/font_info.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"keys","en","ru"
,,
"font_desc_fantasque","A somewhat whimsical monospace font by Jany Belluz.","Слегка причудливый моноширинный шрифт от Jany Belluz."
"font_desc_hack","A workhorse font primarily designed for source code,\nwith focus on legibility. By Source Foundry Authors.","Рабочий шрифт, созданный в первую очередь для кода,\nс упором на удобочитаемость. От Source Foundry Authors."
"font_desc_inconsolata","A variant of Inconsolata font (originally by Raph Levien)\nwith addition of Greek and Cyrillic characters.","Вариант шрифта Inconsolata (созданного Raph Levien)\nс добавлением греческих и кириллических символов."
"font_desc_pt","A typewriter font by ParaType with excellent Cyrillic typography.","Машинописный шрифт от компании ParaType\nс отличной кириллической типографикой."
"font_desc_ubuntu","A font by Canonical with a very distinct style,\ndesigned for the eponymous Linux distribution.","Шрифт с неповторимым стилем, созданный компанией\nCanonical для одноименного дистрибутива Линукса."
keys,en,ru,zh
,,,
font_desc_fantasque,A somewhat whimsical monospace font by Jany Belluz.,Слегка причудливый моноширинный шрифт от Jany Belluz.,Jany Belluz 的一种有点异想天开的等宽字体。
font_desc_hack,"A workhorse font primarily designed for source code,\nwith focus on legibility. By Source Foundry Authors.","Рабочий шрифт, созданный в первую очередь для кода,\nс упором на удобочитаемость. От Source Foundry Authors.",主要为源代码设计的主力字体,\n注重易读性。作者:Source Foundry Authors。
font_desc_inconsolata,A variant of Inconsolata font (originally by Raph Levien)\nwith addition of Greek and Cyrillic characters.,Вариант шрифта Inconsolata (созданного Raph Levien)\nс добавлением греческих и кириллических символов.,Inconsolata 字体的变体(最初由 Raph Levien 设计)\n添加了希腊语和西里尔字符。
font_desc_pt,A typewriter font by ParaType with excellent Cyrillic typography.,Машинописный шрифт от компании ParaType\nс отличной кириллической типографикой.,ParaType 的打字机字体,在显示西里尔字体上很出色。
font_desc_ubuntu,"A font by Canonical with a very distinct style,\ndesigned for the eponymous Linux distribution.","Шрифт с неповторимым стилем, созданный компанией\nCanonical для одноименного дистрибутива Линукса.",Canonical 的字体,风格非常独特,\n为同名的 Linux 发行版设计。
4 changes: 2 additions & 2 deletions text/font_info.csv.import
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ type="Translation"

[deps]

files=[ "res://text/font_info.en.translation", "res://text/font_info.ru.translation" ]
files=[ "res://text/font_info.en.translation", "res://text/font_info.ru.translation", "res://text/font_info.zh.translation" ]

source_file="res://text/font_info.csv"
dest_files=[ "res://text/font_info.en.translation", "res://text/font_info.ru.translation" ]
dest_files=[ "res://text/font_info.en.translation", "res://text/font_info.ru.translation", "res://text/font_info.zh.translation" ]

[params]

Expand Down
Loading

0 comments on commit 54d448f

Please sign in to comment.