Commit Graph

7 Commits

Author SHA1 Message Date
Piotr Drąg
0b744b1179 Update POTFILES.in 2020-02-02 13:47:51 +01:00
Piotr Drąg
78d91826b1 Update POTFILES.in 2019-05-11 13:00:18 +02:00
Piotr Drąg
814ddaa532 Update POTFILES.in 2019-03-16 12:29:47 +00:00
Piotr Drąg
2a888f0bce Update POTFILES.in 2018-08-28 19:44:34 +02:00
Jordan Petridis
b07cd5515a
Refactor Empty states 2018-08-13 02:05:09 +03:00
Piotr Drąg
c77a1e85a4 Update POTFILES.in 2018-08-10 20:58:18 +00:00
Daniel García Moreno
bea4915317 Translation support and initial spanish translation
Added translation support based on the Fractal i18n. To do this I've
added the gettext-rs crate dep. I'm using my own fork because the
official gettext-rs release includes the gettext source files and that
increase the distribution package a lot and for distribution with
flatkap we don't need to build gettext, the lib is in the gnome sdk. So
this gettext-rs fork is the same, but removing the not needed gettext
source files.

The i18n.rs file adds some useful functions to translate strings. These
functions wraps the original gettext and adds more functionality, to be
able to translate compound strings, something that's not supported by
the gettext function.

The 'i18n' function works like the gettext, receives a plain string
without params.

The 'i18n_f' function receives a string with "{}" and a ref to an array
of &str with substitutions for the "{}" in the original string. The
substitution is done by order.

The 'i18n_k' function receives a string with "{named}" and a ref to an
array of (&str, &str) with substitutions for the "{named}" in the
original string. The substitution is done by name, where the first &str
in the tuple is the name and the second the string to use for the
replace.

This mod also include ni18n variants of the three functions for plural
and singular translations.

I've also created the spanish translation.

See #61

https://gitlab.gnome.org/World/podcasts/issues/61
2018-08-02 15:24:19 +02:00