HalosGhost / pbpst

A command-line libcurl C client for pb deployments
GNU General Public License v2.0
44 stars 9 forks source link

Added Swedish translations #75

Closed tmplt closed 7 years ago

tmplt commented 7 years ago

It may be worth of note here that there is no Swedish translation for "paste". I've settled to use "fil" instead, which is just "file". While some English words are commonly used due to a lack of translation, the word "paste" reads awkwardly. Likewise goes for possible alternatives such as "serverfil" ("remote file" or "server file").

HalosGhost commented 7 years ago

Awesome, I will do a once-over to make sure that things are as-expected and then merge it.

Other than the issues in-translation stemming from the jargon itself, did you run into any issues with the translation process? Anything I should know about or can improve upon?

HalosGhost commented 7 years ago

Okay, this passes the once-over with flying colors. Merged.

Now that this has been added, and the build has the message catalog compilation enabled, can you rebuild pbpst and double-check that it actually works @Tmplt?

tmplt commented 7 years ago

I presume language is chosen based on system settings, but since my system is in English, can I specify which language pbpst should run in?

HalosGhost commented 7 years ago

Yes, you can use the LANGUAGE environment variable to specify a locale different from your own. In my personal testing, this resulted in a lot of ? characters (suggesting something went wrong with the translation file) but I am not the most familiar person with locale configuration.

Note that you will have to generate the locale before it can be used.

tmplt commented 7 years ago

This doesn't seem to be working for me, but that's only the case for pbpst. I exported LANGUAGE=sv_SE.UTF-8 which makes other programs like pacman print out in Swedish, but pbpst does not. Same outcome on systemwide installation of latest pbpst-git.

HalosGhost commented 7 years ago

Did you make sure to grab the latest PKGBUILD? The prefix needs to be set both at configure-time and at install-time in order for the translations to actually be found. The latest PKGBUILD sets both properly.

tmplt commented 7 years ago

The current PKGBUILD is marked for v1.3.0.r27.ga3a2884. Have you not pushed the latest version or is it just marked incorrectly?

HalosGhost commented 7 years ago

The PKGBUILD on the AUR correctly sets the prefix at both install and configure time. You can know that you have the right version because it includes a prepare() function that runs ./configure --prefix='/usr'.

The version you listed is the one on the AUR, but that one has the correct setup. Does the PKGBUILD that you are using include that prepare function? In addition, are you on freenode? it might be easier to troubleshoot more in realtime.

HalosGhost commented 7 years ago

In addition, it looks like I missed at least one string in the translation (Caught Interrupt), that has now been added; so after we get you able to test, when we are able to try troubleshooting the translations, that extra string should be added.

tmplt commented 7 years ago

To my fault, I only checked whether the right language was used by running pbpst without any arguments, at which it's in English, even if LANGUAGE=sv_SE.UTF-8 is set — is this intended? When running pbpst with -h (or some flag(s) that produces a message), I'm getting the right language.

Now with that out of the way: I'm also getting question marks instead of characters containing umlauts.

In addition, are you on freenode?

Yeah; same nick as on here.

HalosGhost commented 7 years ago

Oh that is fascinating! I checked only when running with a few command-line arguments. I had not tried it unadorned; the same thing happens for me.

That is definitely not intended behavior and I have no idea why that is happening. Let me dig more into that.

Edit: Oh, I believe I know why this is. This should be a quick fix tonight.

HalosGhost commented 7 years ago

Okay, that should all be handled now. The very first thing that pbpst does now in main() is to setup the i18n and fails out if it cannot do so.

ping me on Freenode when you have a moment so we can troubleshoot the diacritics (my username is also the same).