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

Add editor localization support (WIP) #287

Closed
wants to merge 4 commits into from

Conversation

marynate
Copy link
Contributor

Adding editor localization support.

  • Specific language in editor setting
  • Reading translation strings from [editor setting folder]/lang/[locale]/editor.po

    pls blame Goolge for bad translation :)

po template generated from xgettext and translated in POEditor

@jonyrock
Copy link
Contributor

Looks really nice!

@godotengine
Copy link
Collaborator

amazing! will check it when I get back home tonight

On Mon, Apr 14, 2014 at 8:12 AM, Alexey Velikiy [email protected]:

Looks really nice!


Reply to this email directly or view it on GitHubhttps://github.com//pull/287#issuecomment-40355041
.

OkamStudio

@sanikoyes
Copy link
Contributor

Wow, this is a great patch, i can't wait to use this amaze patch!
A personal question, @marynate are you Chinese?

@duzhi5368
Copy link

Good jobI'm waiting for this
The Chinese translation is very correct.

@marynate
Copy link
Contributor Author

@sanikoyes, yes, I'm from china :)

Just started a new repo for anyone who interested in localizing Godot to his/her own prefer language:
https://github.com/marynate/godot.localization


Godot in Japanese

@reduz
Copy link
Member

reduz commented Apr 15, 2014

this is awesome! will try to merge as soon as possible. I think for the
translations (.po files) maybe they could be zipped and added inside the
editor when it's built, the only requirement for CJK being to just download
an extra font and set it up. This could even be easily automated in the UI
with an option in Settings.

On Tue, Apr 15, 2014 at 9:21 AM, marynate [email protected] wrote:

@sanikoyes https://github.com/sanikoyes, yes, I'm from china :)

Just started a new repo for anyone who interested in localizing Godot to
his/her own prefer language:
https://github.com/marynate/godot.localization

https://camo.githubusercontent.com/440b8ac551504019c2a707beba1f31674bc091e6/687474703a2f2f6f6935372e74696e797069632e636f6d2f34736d7737712e6a7067
Godot in Japanese


Reply to this email directly or view it on GitHubhttps://github.com//pull/287#issuecomment-40474744
.

@sanikoyes
Copy link
Contributor

@reduz a idea is use dynamic ttf font to display CJK character without download/set font.
Load system ttf font file at bootstrap, etc:
On windows platform, load ttf in Windows/Fonts folder, Mac/Linux platfrom same to.
Also can support user special custom ttf font

Pseudo-code:
if settings->custom_font then
oad custom font
elif is_windows_platform then
load Windows/Fonts/msyh.font
elif is_linux_platform then
load /usr/share/fonts/truetype/xxxx.ttf
elif is_mac_platform then
load mac system font file
end

if not loaded font then
load bultin font
end

@reduz
Copy link
Member

reduz commented Apr 16, 2014

@sanikoyes I want to implement dynamic font rendering too, but what I had
in mind is probably a little more complex (rendering the whole text to a
texture on the fly instead of progressively generating a font texture) and
needs deeper changes to the way rendering is done. Would gladly accept
patches or work on that myself after managing to make a stable release, but
right now I really want to focus on having a first versioned, stable Godot,
so for this first version with localization I'd rather non-latin users
either download a font pack, or an installer is created that installs both
things, then we can see how to fix this properly for 1.1.

On Tue, Apr 15, 2014 at 10:36 PM, sanikoyes [email protected]:

@reduz https://github.com/reduz a idea is use dynamic ttf font to
display CJK character without download/set font.
Load system ttf font file at bootstrap, etc:
On windows platform, load ttf in Windows/Fonts folder, Mac/Linux platfrom
same to.
Also can support user special a custom ttf font


Reply to this email directly or view it on GitHubhttps://github.com//pull/287#issuecomment-40554461
.

@reduz
Copy link
Member

reduz commented Apr 22, 2014

Do you think you could move the EditorTranslationServer as well as the _TR macro class to tools/editor ? so core remains mostly unmodified.

@marynate
Copy link
Contributor Author

Since last commit:

  • Refactor EditorTranslationServer and _TR macro into tools/editor/editor_translation.cpp
  • Add "Install Editor Translation" option to install .po and setting locale automatically

All commits squashed and rebased on current master

@Calinou
Copy link
Member

Calinou commented Apr 5, 2015

Bump. How is work on editor localization going (if any)? Is this pull request even mergeable today?

@reduz
Copy link
Member

reduz commented Apr 5, 2015

Planned for 1.2
On Apr 5, 2015 5:14 PM, "Calinou" [email protected] wrote:

Bump. How is work on editor localization going (if any)? Is this pull
request even mergeable today?


Reply to this email directly or view it on GitHub
#287 (comment).

@seadra
Copy link

seadra commented Apr 5, 2015

Just so you know, that Japanese is cavespeak.

@akien-mga
Copy link
Member

What's the status on this @reduz? You said it was planned for 1.2, do you still intend to get it into 2.0 or will it have to wait for 2.1 or later (as we're now trying to go towards releasing 2.0 final in the coming months)?

@marynate marynate force-pushed the PR-editor-tr branch 2 times, most recently from a5374b6 to 92103ff Compare November 7, 2015 15:41
@marynate
Copy link
Contributor Author

marynate commented Nov 7, 2015

Rebased on current master.

@akien-mga
Copy link
Member

Looks like @reduz went for his own implementation in the master branch, so I guess this PR must be closed. Thanks for the work you did though, I do hope it was used as an inspiration for the implemented system :)

@akien-mga akien-mga closed this May 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants