nonnymoose / xsr

X Steps Recorder
MIT License
80 stars 17 forks source link

Localisation #12

Open lezsakdomi opened 6 years ago

lezsakdomi commented 6 years ago

Support for multiple languages. Just the ability first!

nonnymoose commented 6 years ago

@lezsakdomi This proves challenging because of varying keymaps, so I would need speakers of other languages to translate them. They would also need to update the %realchars and @realbuttons.

lezsakdomi commented 6 years ago

@nonnymoose I could care about the Hungarian...

nonnymoose commented 6 years ago

@lezsakdomi I'll post translation instructions in the wiki.

lezsakdomi commented 6 years ago

@{assignee}: Take care of it: if ($key =~ /$mregex/i) { # skip this iteration if the key is a modifier should be done before making it human-readable

lezsakdomi commented 6 years ago

I recommend using Locale::TextDomain.

lezsakdomi commented 6 years ago

I think templates should not split upon translations. What is, when for example the user want to modify the style sheet?

Although I recommend templating all kind of recorded information, for example keystrokes pressed, screenshots, and so on. Doing so would simplify our (developers') life too.

lezsakdomi commented 6 years ago

@nonnymoose Should the default output filename (Untitled Recording) be translated?

nonnymoose commented 6 years ago

@lezsakdomi Sorry, I haven't been able to work on localization for a while. Currently what I plan to do is:

Instead of making a template for each language like I originally planned to do, I will make one template with placeholders for language-specific strings. (which will be stored in locale-specific files)

nonnymoose commented 6 years ago

After seeing 5aaa2d01bfc51a7efef81b68f4aa4a0b3135ef75 I just plan to translate keymaps.

lezsakdomi commented 6 years ago

@nonnymoose No worries.

But I think mouch more is left:

lezsakdomi commented 6 years ago

If not a problem, I could do them (i think).

nonnymoose-xsr-machine-user commented 6 years ago

@lezsakdomi That is fine, but I noticed that it wasn't automatically translating:

$ ./xsr --help
Usage: ./xsr [options] [outfile]

Options:

  --no-mouse                   Do not add mouse to screenshots
  -c|--image-extension=ext     Extension of image output (png or jpg)
  --no-countdown               Don't display countdown
  -u|--capture-focused         Captured the focused window only
  -h|--help                    Print this message
  -q|--quiet                   Supress output to STDOUT
  -e|--edit-images-before-save Edit images before saving file
  --countdown[=seconds]        Display countdown (default 5)
  -d|--image-deps              Do not convert images to base64; instead, output the dependent file and it's resources directory
  -o|--out outfile             Output file name (also can be first argument)
$ export LC_ALL='es_US.UTF-8'
$ apt-get baksjf
E: Operación inválida: baksjf
$ ./xsr --help
Usage: ./xsr [options] [outfile]

Options:

  -o|--out outfile             Output file name (also can be first argument)
  --countdown[=seconds]        Display countdown (default 5)
  -d|--image-deps              Do not convert images to base64; instead, output the dependent file and it's resources directory
  -q|--quiet                   Supress output to STDOUT
  -e|--edit-images-before-save Edit images before saving file
  -h|--help                    Print this message
  --no-mouse                   Do not add mouse to screenshots
  -c|--image-extension=ext     Extension of image output (png or jpg)
  --no-countdown               Don't display countdown
  -u|--capture-focused         Captured the focused window only
$
lezsakdomi commented 6 years ago

Theoretically it's translated to English. I have done a PHP project with gettext before, Locale::TextDomain uses this algorithm as base. Currently I am experimenting with creating a translation locally.

On Sat, Jan 6, 2018, 5:51 PM nonnymoose-xsr-machine-user < notifications@github.com> wrote:

@lezsakdomi https://github.com/lezsakdomi That is fine, but I noticed that it wasn't automatically translating:

$ ./xsr --help Usage: ./xsr [options] [outfile]

Options:

--no-mouse Do not add mouse to screenshots -c|--image-extension=ext Extension of image output (png or jpg) --no-countdown Don't display countdown -u|--capture-focused Captured the focused window only -h|--help Print this message -q|--quiet Supress output to STDOUT -e|--edit-images-before-save Edit images before saving file --countdown[=seconds] Display countdown (default 5) -d|--image-deps Do not convert images to base64; instead, output the dependent file and it's resources directory -o|--out outfile Output file name (also can be first argument) $ export LC_ALL='es_US.UTF-8' $ apt-get baksjf E: Operación inválida: baksjf $ ./xsr --help Usage: ./xsr [options] [outfile]

Options:

-o|--out outfile Output file name (also can be first argument) --countdown[=seconds] Display countdown (default 5) -d|--image-deps Do not convert images to base64; instead, output the dependent file and it's resources directory -q|--quiet Supress output to STDOUT -e|--edit-images-before-save Edit images before saving file -h|--help Print this message --no-mouse Do not add mouse to screenshots -c|--image-extension=ext Extension of image output (png or jpg) --no-countdown Don't display countdown -u|--capture-focused Captured the focused window only $

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nonnymoose/xsr/issues/12#issuecomment-355759492, or mute the thread https://github.com/notifications/unsubscribe-auth/AIJfoRStaR3WkKCZefitvwZGWyLh5Lwtks5tH6R7gaJpZM4PxwQk .