SwiftcordApp / Swiftcord

A fully native Discord client for macOS built 100% in Swift!
https://swiftcordapp.github.io/Swiftcord/
GNU General Public License v3.0
1.85k stars 84 forks source link

Fix: Weird localization words order in onboarding title screen. #158

Closed Uhucream closed 1 year ago

Uhucream commented 1 year ago

About this Pull Request

This pull request fixed a problem that onboarding title words order was wrong on Japanese.

What was the problem?

The Japanese localization of "onboarding.title" should be "Swiftcord へようこそ" but because of a localization interpolation code was wrong, so it had been shown "へようこそ Swiftcord".

スクリーンショット 2023-05-26 午後6 05 50_before



To convey that the word order in "へようこそ Swiftcord" is grammatically incorrect in Japanese, you can use the following translation in English like this:

Translation: Swiftcord to welcome .

I hope you realize such weird words order.

Screenshots (Before and After)

This section also stands for proving there are no regressions.

Before After
Chinese, Simplified スクリーンショット 2023-05-26 午後6 07 19_before スクリーンショット 2023-05-26 午後6 19 09
Chinese, Traditional スクリーンショット 2023-05-26 午後6 07 54_before スクリーンショット 2023-05-26 午後6 19 47
Dutch スクリーンショット 2023-05-26 午後6 08 27_before スクリーンショット 2023-05-26 午後6 20 29
English スクリーンショット 2023-05-26 午後6 06 50_before スクリーンショット 2023-05-26 午後6 21 08
French スクリーンショット 2023-05-26 午後6 09 47_before スクリーンショット 2023-05-26 午後6 21 34
German スクリーンショット 2023-05-26 午後6 10 11_before スクリーンショット 2023-05-26 午後6 21 59
Hebrew スクリーンショット 2023-05-26 午後6 10 36_before スクリーンショット 2023-05-26 午後6 22 37
Italian スクリーンショット 2023-05-26 午後6 10 59_before スクリーンショット 2023-05-26 午後6 24 10
Japanese スクリーンショット 2023-05-26 午後6 05 50_before スクリーンショット 2023-05-26 午後6 25 13
Korean スクリーンショット 2023-05-26 午後6 11 59_before スクリーンショット 2023-05-26 午後6 26 00
Norwegian Bokmål (Norway) スクリーンショット 2023-05-26 午後6 12 28_before スクリーンショット 2023-05-26 午後6 26 56
Polish スクリーンショット 2023-05-26 午後6 14 18_before スクリーンショット 2023-05-26 午後6 27 31
Russian スクリーンショット 2023-05-26 午後6 14 40_before スクリーンショット 2023-05-26 午後6 27 59
Turkish スクリーンショット 2023-05-26 午後6 15 03_before スクリーンショット 2023-05-26 午後6 28 27

References

https://www.kodeco.com/29501177-attributedstring-tutorial-for-swift-getting-started

https://gist.github.com/mattyoung/5be253f8dc7ac924f23362472c5e3344

Uhucream commented 1 year ago

@cryptoAlgorithm

By the way, I'd confirmed translations correctness of this fix with ChatGPT and DeepL.

cryptoAlgorithm commented 1 year ago

Haha that's hilarious! 😂 These look good, but I'll need to take some time to ensure merging these don't completely screw up contributions from Weblate (which are already messed up as is). Sorry for the delay, and thanks for your efforts for bringing swiftcord to more languages!

Uhucream commented 1 year ago

@cryptoAlgorithm

Haha that's hilarious! 😂 These look good, but I'll need to take some time to ensure merging these don't completely screw up contributions from Weblate (which are already messed up as is). Sorry for the delay, and thanks for your efforts for bringing swiftcord to more languages!

Thanks for confirming this pull request!

I see. It's good timing because I've wanted to refactor styling logic of Swiftcord string to simpler way!

So I work it until these correct translation is coming.

Uhucream commented 1 year ago

@cryptoAlgorithm

I worked the refactor for styling Swiftcord string on 90d7a7e.

I'd used the emphasize clause to style string but we shouldn't do that. Because translators should not be known string styles on point of view of domain-driven development.

This fix has benefits below.