2020-01-04 - Re: [GRASE-Hotspot] Re: Happy New Year! V4 Update

Header Data

From: Tim <ti***8@gmail.com>
Message Hash: a21a2f18457922aa28c0d32ca4822068939acd30dad95e993f9b5a21be46360c
Message ID: <CAESLx0LmYmAteuZ0ZFLSWj-N9cXCS+bCXP-_tBpGyFYaEBXYQg@mail.gmail.com>
Reply To: <e1486d8a-c504-4b7f-96f0-afc4841ba293@grasehotspot.org>
UTC Datetime: 2020-01-04 07:09:34 UTC
Raw Date: Sat, 04 Jan 2020 22:09:34 +0800

Raw message

Hi Alan

Not at all! There are now 2 translation "formats", one for the JS and one
for the normal messages. The main difference is that the JS ones have
variables formatted with % signs (%remainingSessionTime%) while the normal
ones are in ICU format and use curl brackets '{}' for variables
({updatedSettings}).

Head to the translations folder on the Symfony 4 branch to download the en
translation files to get started (
https://github.com/GraseHotspot/grase-www-portal/tree/symfony4/files/usr/share/grase/symfony4/translations
)
Currently, these translation files aren't on Transifex, and there seems to
be an issue with uploading them to use them. If you know of a good
translation site that supports open source projects, and XLIFF 2.0 then let
me know.

We are also moving towards using ID's for messages, as this allows us to
adjust the English message in the future, without invalidating the
translations for all other languages. It appears to be a common "best
practice" thing to do, so hopefully, it doesn't make your job of
translating harder. As much as possible the ID's are sensible, for example,
grase.menu.dhcp_leases means it's part of the Grase project, a menu item,
called dhcp_leases. There are some JS ones that are English messages, and
this is due to the fact they are error messages that come from Freeradius,
and I've decieded to ensure that if they can't be translated for some
reason, the error is still meaningful. (e.g. if you're accessing it via an
API so the JS translation stuff isn't happening). If this changes in the
future it'll be easy to update the translations to use new message IDs.

Once you have some translation files (aptly named for your language), just
create a merge request on Github, or email the files off-list if that's
easier. I believe the translation engine still supports locale specific
language translations (en-GB, en-AU, en-US) if required. I've also not yet
written the code to select your language, so I'll definitely do that once I
have at least 1 translation I can test with.

I look forward to your translations.

Regards

Tim

On Sat, 4 Jan 2020 at 21:05, kralan <kr***n@gmx.at> wrote:

> Wow, great!
>
> Would it be too early to start testing and translating?
> I keep the german translation updated and could also contribute to the
> croatian translation.
>
> Alan
>
> --
> This mailing list is for the Grase Hotspot Project http://grasehotspot.org
> ---
> You received this message because you are subscribed to the Google Groups
> "Grase Hotspot" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to gr***e@grasehotspot.org.
> To view this discussion on the web visit
> https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/e1486d8a-c504-4b7f-96f0-afc4841ba293%40grasehotspot.org
> <https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/e1486d8a-c504-4b7f-96f0-afc4841ba293%40grasehotspot.org?utm_medium=email&utm_source=footer>
> .
>

Thread