Live data from Hacker News

Show HN: a18n – Automated I18n JavaScript Solution

github.com

11–20 of 27 posts

Re: Show HN: a18n – Automated I18n JavaScript Solution

#12
post #8

Shameless self-promotion hijack: https://github.com/whyboris/JSON-i18n-Editor A web interface for letting your team translate JSON i18n files - in case you store your i18n in JSON. See the live demo: link on the GitHub page.

Great job! A multi-user translate platform is essential to the entire workflow!

Re: Show HN: a18n – Automated I18n JavaScript Solution

#13
post #9

Not sure on the name a18n, because it looks like a numeronym, like i18n is, but doesn't seem to be, had me trying to guess what the 18 characters are between a and n. I get it's a18n like Automated18n like AutomatedI18n.

This is like a11y - "accessibility" a[eleven letters]y - https://www.a11yproject.com/

As abbreviations go, a11y is a quiet masterpiece, being simultaneously a numeronym, a homograph, a domain-relevant noun, and an Internet in-joke.

I'd hope that whosoever dreamed it up, went home for lunch and never returned.

With the best will in the world, I'd struggle to rate this a18n in the same ballpark of poetic genius as a11y.

Re: Show HN: a18n – Automated I18n JavaScript Solution

#14
post #8

Shameless self-promotion hijack: https://github.com/whyboris/JSON-i18n-Editor A web interface for letting your team translate JSON i18n files - in case you store your i18n in JSON. See the live demo: link on the GitHub page.

Our CMS for JSON files goes into a similar direction: https://frontaid.io/

Re: Show HN: a18n – Automated I18n JavaScript Solution

#15
post #6

From what I can tell, this scans code for strings that can be translated, and then you supply translations from the initial language resulting in a mapping of Chinese to other languages (using Chinese as an example). What happens if you update that initial translation that every other language hooks off? Do you end up with orphans? At the same time, you may not speak all your languages so you may end up with no -equi…

Thank you! This concern is valid. If we change original (let's say) Chinese texts in code, and re-run the CLI (wrap+extract). These happens (in my company's workflow):

1. CLI removes (oldKey -> oldValue) entry from en.json (a18n don't keep stale keys)

2. CLI adds (newKey -> null) entry to en.json

3. Developer commits updated en.json (yeah it's versioned)

4. A script (not in a18n yet) scans en.json, found untranslated text and warns

5. It's up to the developer to decide what to do with missing translation

Not too perfect, but I think keeping original text in code instead of "some.text.id" also has its benefit:

1. Devs understand the texts, this brings more context and makes code easier to understand

2. Some huge projects in my company exists long before they need to support i18n, and it is just too expensive to manually migrate from `text` to `code`

Re: Show HN: a18n – Automated I18n JavaScript Solution

#16

Not sure on the name a18n, because it looks like a numeronym, like i18n is, but doesn't seem to be, had me trying to guess what the 18 characters are between a and n. I get it's a18n like Automated18n like AutomatedI18n.

I naturally assumed, and by naturally I mean egrep '^a.{18}n$' /usr/share/dict/words, that a18n abbreviated anthropomorphization , and so in context that perhaps we'd be helping a recently translated program feel more settled in its new repository.

Not an English speaker but this is still awkward: I always think "i18n" expands to 18 characters until I see your comment and checked `"internationalization".length` in console to be 20

Re: Show HN: a18n – Automated I18n JavaScript Solution

#17
post #8

Shameless self-promotion hijack: https://github.com/whyboris/JSON-i18n-Editor A web interface for letting your team translate JSON i18n files - in case you store your i18n in JSON. See the live demo: link on the GitHub page.

Nice. Being a happy customer of https://poeditor.com I'd like to point out that there's also a service for this out there.

Re: Show HN: a18n – Automated I18n JavaScript Solution

#18

Earlier quoted context omitted.

I naturally assumed, and by naturally I mean egrep '^a.{18}n$' /usr/share/dict/words, that a18n abbreviated anthropomorphization , and so in context that perhaps we'd be helping a recently translated program feel more settled in its new repository.

Not an English speaker but this is still awkward: I always think "i18n" expands to 18 characters until I see your comment and checked `"internationalization".length` in console to be 20

yeah 18 is replacing the middle 18 characters in the word, not including that i and n at the ends. I personally don't like it because it's just an English speaking programmer in-group shibboleth that has bled over to k8s for kubernetes and a16z for Andreessen-Horowitz

Re: Show HN: a18n – Automated I18n JavaScript Solution

#19
post #4

Nice work! What's the difference between this and .po/.mo files and the ugettext standard?

Thank you for asking this question - it lead me to find this library (and I think the quickstart highlights some differences to how the gnu gettext standard could be leveraged in js/ts vs a "propiatary" solution based on json) :

https://ttag.js.org/

https://ttag.js.org/docs/quickstart.html

Post reply on HN