Hacker News new | past | comments | ask | show | jobs | submit login
Fluent: a localization system designed to improve how software is translated (projectfluent.org)
20 points by buovjaga on April 5, 2018 | hide | past | favorite | 10 comments



I am confused. I have been clicking around on the page for a few minutes and I have not yet encountered one example where the text is actually being localized, just examples in English.

I'd like to see an example on the first page on how would I add a translation for a language that requires different wording for numbers 2 to 5 for example.

Also, why [0] and then [one] ?


Hi, one of the authors here!

Thanks for checking out our work! :)

> I have not yet encountered one example where the text is actually being localized, just examples in English.

Haha, yeah, our website is not localized itself. It may sound funny, but we believe our target audience at this stage of the project development is pretty much English-speaking, so we didn't invest in localization of it :)

> I'd like to see an example on the first page on how would I add a translation for a language that requires different wording for numbers 2 to 5 for example.

Polish is an example of such language. An example of a plural variant selector with it would be:

  shared-photos =
      { $user_name } { $photo_count ->
          [one] dodała jedno zdjęcie
          [few] dodała { $photo_count} zdjęcia
         *[many] dodała { $photo_count } zdjęć
      }.
The categories come from http://www.unicode.org/cldr/charts/33/supplemental/language_...

And we use just standardized `Intl.PluralRules` that gets the correct category - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

> Also, why [0] and then [one] ?

This is a "smart selector". By default, since the selector is a number we guessed that it should be run via plural selector and then matches against result category list (hence one,few,many)

But on top of that we also experience a common use case where the UX wants to add a special form of the sentence for particular values - usually for 0, like this:

  shared-photos =
      { $user_name } { $photo_count ->
          [0] hasn't added any photos yet
          [one] added one photo
         *[other] added { $photo_count } photos
      }.
Without `[0]`, in the example above (English), the `0` value would end up in `other` plural category.

Hope that helps!


Thank you for the explanation! I would recommend linking this page: https://github.com/projectfluent/fluent.js/tree/master/fluen... (or some extract from it) more prominently and also put the supported languages up front.

The project definitely seems interesting to me. What is the current project guidance? A Swift version would be quite useful and I might be interested in contributing.


Thanks!

We decided to start kind of low level and build blocks and combine them per use case.

Here's our roadmap - https://github.com/projectfluent/fluent/wiki/Roadmap

For 1.0 we're aiming at JavaScript, Rust and Python. But if you look at the issues people are talking about Java, C#, Kotlin etc. ports so Swift sounds like a good candidate as well! It all comes down to use cases.

We're currently finalizing 0.7 release which we hope will be the last one including syntax changes (very, very minor - mostly white space relaxation and normalization), and it will allow us to stabilize our EBNF and parser/serializers which, in turn, will make it easier for ports to be written.

Contributors welcomed :)


Most importantly, what this brings over gnu gettext? Afaict, all advertised features are present on gettext.



I don't believe gettext supports bidirectionality, genders, declension, date/number formatting, compound messages and so on.

Can you help us understand what can we do to better promote the unique features we offer?


What advantages does your syntax offer over the ICU standard? http://userguide.icu-project.org/formatparse/messages


I'd also love to see a translation demo and not English examples. I know there are tons of outdated programs out there like SDL Trados, but apps like Smartling or GTT are decently efficient.

It'd be cool to see quantitative data on how much time this could save.


My teammate wrote a cool blog post yesterday giving a few examples of what's becoming possible: https://www.yetanothertechblog.com/2018/04/05/why-fluent-mat...

We now have a good core of UI in Firefox migrated to Fluent so you can check our CAT tool for any of the over 100 languages into which we have it translated for examples of Fluent.

Here's tagalog - https://pontoon.mozilla.org/tl/firefox/browser/browser/prefe... :)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: