Translations and virtual touch keyboards - tracking localization

I’ll try to pound out Pure Maps Japanese translation this weekend. Note that Japanese is mispelt in the screenshot for ‘Languages’ col (Japanise)

1 Like

Corrected and updated: Turkish among others previously added. Next update to the table during the weekend, maybe.

Merge request for fr.yaml done

2 Likes

Table updated.

Gnome translations collectively increased +10% but not much happened to L5 apps last week. Participation is appreciated, I would imagine. Only a few words here and there, is all that’s needed at a time.

I did a quick check and a few cases, layouts need only tweaking of a few characters, after which they can be copied and renamed layouts for another language. Catalan, Danish, Esperanto, Basque and Czech, to name some. They still need native-level to verify that most used characters are in logical places or where they are commonly used on a layout.

I would love to add Arabic to the keyboard layouts, but I don’t know where would I find the files to translate, can someone guide me please?

I already discovered how to translate Phosh and Chatty (in Zanata), but I have to idea about the keyboard layouts.

Thank you.

It’s long overdue to write a comprehensive guide how to add a keyboard layout from start. But unfortunately, I don’t have much time left ATM. A lot of information can be found in this thread.

So at least I will try to start writing a short how-to here and edit this post as I find the time. Hope this helps a bit - comments and corrections welcome.

Get one of the existing keyboard layouts

  • You can get one of the keyboards from the squeekboard git repository : https://source.puri.sm/Librem5/squeekboard
  • The keyboard layouts are located in the subdirectory data/keyboard/ in the .yaml files
  • Take a look and try to understand them :slight_smile:

Fork your own copy of squeekboard

  • Best way would be to start with a fork of the squeekboard repository: Create a user account at https://source.puri.sm/, go the the squeekboard git repository, press “Fork” in the web interface. You can find further instructions here.
  • Clone your fork locally with git clone and use the uri of your forked repo there

Workflow to edit your keyboard and get it merged

  • A generic guide how the workflow to contribute works, can be found at https://developer.puri.sm/Librem5/Contact/Contributing.html
  • Create a branch: Name it “keyboard-layout-mylanguage” or whatever
  • Checkout your branch, edit your keyboard layout and commit your changes
  • Push the local changes (to the branch of your fork of squeekboard)
  • Create a merge request for the branch to get your changes merged to the official squeekboard git repository

Compile squeekboard

Running squeekboard

  • Follow these instructions to run squeekboard: https://source.puri.sm/Librem5/squeekboard/blob/master/README.md#running
  • Additionally take a look at https://source.puri.sm/Librem5/squeekboard/blob/master/HACKING.md#testing
  • You can either test it locally on your Linux system or use the QEMU Librem 5 image
  • To test squeekboard locally, you need phoc. Either compile that from the sources as well or use the CI repository ci.puri.sm for Debian based systems:
    deb [arch=amd64] http://ci.puri.sm/ scratch librem5
    Squeekboard can be installed from there as a Debian package, too (that’s what I often do). But beware - there be dragons! You could bork your system with these packages and you should probably disable this repository again after installing what you need - these packages are not meant for production systems (or so I heard :wink: )

Creating the keyboard layout

  • To be written: For the time being, take a look at Using non-latin language on Librem 5
  • The correct name of the .yaml file can be found with the command gsettings get org.gnome.desktop.input-sources sources
    The output should be something like this: [('xkb', 'us'), ('xkb', 'de')]
    So f.ex. “de.yaml” would be the correct name for the German keyboard layout.
  • The translations for the keyboard layout names in the different languages can be found at data/langs/
  • Don’t forget to add your newly created layout or translation to src/resources.rs and the layout to tests/meson.build (that’s for me, because I always forget it)

Testing the layout

  • Copy your yaml file to ~/.local/share/squeekboard/keyboards/ for testing purposes. From there it should get picked up by squeekboard
  • To test the translations in data/langs/, you have to compile squeekboard
9 Likes

This is awesome. Do you mind if I take it and put into the official keyboard docs? (and possibly developer.puri.sm ?) If yes, then I’m going to bump providing good documentation a little on my list.

2 Likes

Sure, please do if you think it’s OK. I just thought this wasn’t in a state to do even a MR yet. But I wanted to provide something for newcomers… :blush:

1 Like

News for the incoming release: after installing squeekboard-devel, you’ll get a program called squeekboard-check-layout, which will tell you what problems your layout might have:

squeekboard-check-layout path-to-my-lang.yaml
4 Likes

Updeted the table at the beginning of the thread.

A couple of new languages: Arabic, Hungarian.
New words/strings to translate, which dropped the percentages for some. Please see if you can contribute - a word here and there…

Chatty is pretty much done in Latin (~5% left). I took a whack at starting GNOME localization but their system is way more complicated and involved than Zanata. I’m sure it works great for large teams but for teams with only a few active members it’s a little much.

1 Like

GNOME is big project and has a bit of history doing things the way they do. But that amount of people translate a lot in a week (at least compared to single projects), which is nice. If translating GNOME to latin is a bit much, why not try Pure Maps for the fun of it? It uses Transifex, which is similar platform to Zanata. Or ask one of the singular apps directly in the list (see wiki) - maybe they might put their language files to a translation platform?

And I’m sure later on ther will be plenty more apps to translate - just as soon as they are put up for translating (I imagine that it hasn’t been a top priority lately and less with Zanata’s unsure future / lack of decision for alternative). Also: updates need translation every now and then.

I submitted @Kareema’s tutorial as the first file for a new documentation: https://source.puri.sm/Librem5/squeekboard/merge_requests/285

3 Likes

New release changes the layout files: you need to remove the bounds from the layout. It will be calculated automatically! Finally!

Also, button outlines got simplified. No good reason to carry all those 0’s around.

3 Likes

As the forum closes editing of the first message, this update now here only (instead of the top where all the links and info is).

New language started: Ukrainian. New keyboard in the works: emojis (not a language as such but does help with communication so counts :face_with_monocle: :speech_balloon: :vampire:). Wide versions are also coming. Esperanto and latin get a :star2: for activity. Some others (including “Full”) should check that they have updated as there were new words added some time ago - not much needed.

And as @dcz updated previously, keyboard layouts should be easier to do now. But they still need natives to work on them, for only they know what is normal, efficient and user friendly. They are needed for everyone - for instance, think about travelling and needing to look for places or names spelled in a certain way etc.

2 Likes

How do you say “telephone call” in Latin? I can’t wait until someone starts a Klingon or Dwarvish translation. I wonder if there is a free font for Dwarvish runes.

You’ll have to ask @Jt0. Dictionary gives four alternatives for telephone and 93 for calling, so it seems more like there is an abundance of possible combinations from which to decide on the right one.

It’s really pretty arbitrary how you could render that since there aren’t widely agreed upon terms for either word. “Telephonum” is my best guess for “phone,” but the sense of the word here is more like “with a phone.” “Telephonicus, Telephonica” is the adjective meaning “telephonic,” and “telephonice” is the adverb form of that adjective. “Call” as a noun has no equivalent in Latin as far as I know, but if I were to make a “phone call” button, I’d say “vocare telephonice” which in English is “to call telephonically” or less awkwardly “make a phone call.”

In the UI’s I’ve seen that people have translated into Latin, people render words like “Search” or “Go” in the infinitive, like “(click this) to search” and “(click this) to go” since there’s not an equivalent to either word alone, and that’s what I’ve done so far.

I’ve seen one site (latinitium.com) that uses the imperative form, as in “(I command you to) search” or “(I command you to) go,” but in my opinion that’s not the right sense of the word to use on a button that the user has the option of clicking. I expect buttons to tell me what will happen when I click them, not to tell me to do something by clicking them.

1 Like

Tele (far) and phone (voice) come from Greek, not Latin. The question is whether you should create a neologism based on Latin, or use a loan word from the Greek. In order to be understandable, it is probably best to use a loan word, but then the question becomes whether it should be phonetized with Latin letters or not. The φ in classical Greek was pronounced as /pʰ/ (an aspirated p sound), but it changed to /f/ in modern Greek, so in Latin should it be spelled as telefonice for modern Greek pronunciation or telephonice to reflect the classical Greek with a loan letter from the Greek since Latin doesn’t have an aspirated p sound in the language?

Gee, isn’t it fun to argue about a language that nobody speaks!

1 Like

Classical Latin has plenty of words both with Greek origin and as direct loanwords from Greek transcribed into the Latin alphabet, and many of these used “ph” to render phi. Since medieval times people have been introducing words from English, often with Greek roots, into Latin so they could continue to write and speak it. Telephonum has documented use, while a unique pure-Latin neologism like “ultravox” or “longevox” would leave many users scratching their heads about why you’re talking about a “super voice” or “long voice.”

As far as whether to use the latinized spelling or not, “telefonum” isn’t documented. See also the Vicipaedia article on telephonum. The citation for the word “telephonum” seems to be from an edition of the Lexicon Recentis Latinitatis, but the book is pretty much impossible to find. A small excerpt from it (Italian to Latin) can be found on the Vatican’s website.