bragefuglseth / keypunch

Practice your typing skills
GNU General Public License v3.0
85 stars 13 forks source link

[Language Request]: Ukrainian #21

Closed xalt7x closed 3 weeks ago

xalt7x commented 1 month ago

English Name

Ukrainian

Native Name

Українська

Syntax

Ukrainian is an East Slavic language. It uses a Cyrillic alphabet, almost identical to some other Slavic languages (Bulgarian, Belarusian), except that it has some extra letters (і - U+0456, ї - U+0457, є - U+0454) as well as Ukrainian apostrophe symbol (ʼ - U+02BC). Sentences and proper nouns begin with a capitalized letter. The punctuation marks used are , ; : to break up sentences, and . ! ? to end them. Punctuation marks come directly after their corresponding words, and are followed by a space before the next word. Expressions can be wrapped in typewriter quotation marks " ".

Implementation Assistance

Additional Information

No response

bragefuglseth commented 3 weeks ago

Hi, thanks for the request! I've made a demo implementation based on the information you've provided, and it's ready for testing. You can build the app from source by following the instructions in CONTRIBUTING.md, and select Ukranian in the Text Language dialog. Let me know if it looks good or if something should be changed.

UrtsiSantsi commented 3 weeks ago

@xalt7x: Isn't it correct to use „ “ instead of " "? Or is it « » instead?

xalt7x commented 3 weeks ago

@UrtsiSantsi

@xalt7x: Isn't it correct to use „ “ instead of " "? Or is it « » instead?

Thanks for asking. I believe that all of these quotation marks are valid for Ukrainian language.
The most used are straight quotation marks ("") , as in English, and also chevrons («») .

Gengo style guide got it right:

Ukrainian quotation marks are the same as the English ones, i.e. consist of opening and ending curly quotation marks (“…”). Straight quotation marks are accepted. In documentation (help files, brochures, license agreements, EULAs) — chevrons («») must be used. English straight quotation marks (“”) should be used when translating software texts (UI options included) and texts for Web pages.
Note: It is important to remember that a full stop is to be placed outside the quotation marks and not inside as it is in English.

I personally believe that typing application should use straight quotation marks ("") for Ukrainian. On the picture below we can see standard for Linux Ukrainian Unicode keyboard layout:

KB_Ukrainian_Unicode

I'll provide keyboard shortcuts from this layout using keys of English (US) keyboard layout that in the same place as Ukrainian characters.

As you can see, straight quotation marks are the easiest to type. Hence it's the most popular symbol for quotation in Ukrainian. And that's why I believe that it should be used in Keypunch. Also, for some unknown reason I can't type «» in Firefox on Linux.
P.S. Not to mention that it's hard to enter chevrons («») on Windows (with their Ukrainian keyboard layout) without resorting to Alt shortcuts for Unicode characters (e.g. Alt+0171 , Alt+0187) or installing unofficial Ukrainian Unicode keyboard layout

@bragefuglseth Thanks for implementing this! While comparing it with English, I don't see anything particularly unusual. The only thing that remains mysterious to me is the meaning of the special code for Ukrainian language:

Language::Ukranian => simple_generic(&language.to_string(), " "),
...
Language::Ukranian => advanced_generic(&language.to_string(), " ", GENERIC_PUNCTUATION)
bragefuglseth commented 3 weeks ago

The only thing that remains mysterious to me is the meaning of the special code for Ukrainian language

Nothing to worry about! It's just the code syntax being a little confusing. The | before each language is actually an OR operator, so the function call after Language::Ukranian is used if the language is Ukranian OR any of the preceding ones. I've laid things out this way so it's easy to account for languages that do need special treatment in the future. Ukranian just happens to be last alphabetically as of now.

bragefuglseth commented 3 weeks ago

Thanks for the help with getting Ukranian into Keypunch!