-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Requirements - MF wishlist #3
Comments
I'am listing requirements from the 1st meeting slides : List of possible requirements
|
Proposal for an additional requirement:
|
Sorry, I wasn't there in the first meetings so I'm not sure what is meant with "HTML Markup"? But:
And add:
{ count , plural ,
=0 {No candy left}
one {Got # candy left}
<10 {Got a few candies left}
10-20 {Got a handful candies left}
other {Got # candies left} } edit: |
Ability to interpolate localization with HTML. Example: <span>You have <b>6</b> unread messages from <img/> Mary.</span> Fluent provides DOM Overlays which are heavily used in Firefox l10n - https://github.com/projectfluent/fluent.js/wiki/DOM-Overlays |
@zbraniecki thank you for explaining...so basically take the innerhtml element(s) and extend it with the attributes and content contained in the translation...looks similar to the edit: |
@mihnita should i reference here the your entire document or we can break it in features to add here ? |
In our experience Instead, we whitelist allowed textual elements ( <p data-l10n-id="key1">
<a href="https://www.mozilla.org" data-l10n-name="link"/>
<img src="./pics/img1.png" data-l10n-name="logo"/>
</p>
That's significantly more involved than |
|
I will break into features.But maybe also link, so that others can read the complete doc.I think that the current list of features will also need to "grow" with some more details. As it is some of them are so short that only the one who proposed it really understands what it means :-)MihaiOn Jan 6, 2020 11:41, Romulo Cintra <notifications@github.com> wrote:@mihnita should i reference here the your entire document or we can break it in features to add here ?
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
|
My Proposal :
I feel that also the short description ones will grow to have their own issue/task, but I think we can figure out later after we groom and filter the tasks/lists of requirements |
My proposal for the process @romulocintra is to set a deadline, then de-dupe the list, then prioritize into mvp, v1, v2... so we can move this along. |
@longlho i believe this(process , mvp , roadmap , goals) must be addressed in #4 where we can define all related organizational and process as a team. Related with this task and regarding how we organize the list, I think the previous proposal can fit our current needs, I did not propose any deadline for this task but I see next meeting as a good candidate to prioritize/filter/de-dupe the items originated in this thread. finally, we can review #4 to close all the organizational issues, deadlines and goals. Meanwhile, I'm referencing your comments in #4 PS: just added this topics to the next meeting agenda |
Right now, in ICU4J, if you do: You can do this: |
Sorry for joining the conversation late and having to leave the last session early but here is my take:
|
Can we keep the language used to retrieve the UI strings separate from the language/locale used to format variables/placeholders within a string? |
Fluent does support it, it's called "partially formatted variables" and currency was the particular example that drove that feature. The way it works in Fluent is this: ctx.format('product-cost', {
amount: FluentNumber(342, {
currency: "JPY",
})
}); // Translation can just use "default" formatting options
product-cost = This product costs { $amount }
// Or a translation can specify its own list of options (based on ECMA402 NumberFormat
product-cost = This product costs { NUMBER($amount, minimumFractionDigits: 3) } An important bit is that the selector ( |
Fluent comes with a CAT tool - https://github.com/mozilla/pontoon / https://pontoon.mozilla.org/
I'm not sure if I agree. Features like compound messages are important only when you look at the problem in context of UI widgets. The drive to be agnostic may lead to a syntax that is not really optimized for anything. |
I previously gave a presentation called Let's Come To An Agreement About Our Words. The presentation covers an older format that we used in Siri, and we're migrating to a newer simplified format. Here are some highlights on what it can do or found was desirable.
This functionality works or is shipped on Linux, macOS, iOS, tvOS and watchOS. The watchOS support is probably the important thing to highlight because it is the most resource restrictive environment to support. I'm just stating that this functionality can live in resource constrained environments where grammatical correctness of a message is important. |
While we definitely experienced a very vocal community of users of Firefox who want to use different translation from locale formats, this has also been a trap for regular users because date/time formats often contain translations. For example, Japanese There are even extreme cases. If the user had german translation, with a date that is formatted in My initial position is that we generally should, by default, format placeables (numbers, dates etc.) using the same locale as the translation is in, and allow for the develop to provide an alternative language negotiation for formatters in order to handle exceptions like you mentioned. This is also important once we start talking about the error handling UX. Fluent has been designed to fallback using a locale chain, so if there's an error or missing string in the primary language, we'll fallback on the second best choice, rather than display an error and break the app. |
@grhoten - this is awesome! Thank you for sharing! We have some experience with TTS in form of Common Voice project which uses Fluent. While I don't see it in the translation resources they use now, I remember that in some variant of the project they used fluent's compound messages to represent the spoken/written difference: time-is =
.written = { $time }
.spoken = The time is { $time } It was an unexpected use of the compound messages, but brought up the idea that having message variants that are recognized as a single unit (with comments, invalidation rules, fallbacking together etc.) is important. |
Most OSes allow for a separation between the formatting locale and the resource locale, but it is not always explicit.
It is a really useful thing for regional variants.
Most applications are localized into Spanish, French, Arabic, etc. Rarely there is a "flavor" like Spanish-Latin America
But there are tens of countries using each of these languages, and they use different date / time / number formats.
So for the user it is best if one can use the French-Swiss locale (for example), and that will format things for fr-CH, but load the fr resources, with fallback.
If the fallback is granular enough (for instance on Android and Java it is string level) then one can have (for example) everything translated into French, and a document (or string) for fr-CH to cover country specific stuff (think legal, or special functionality)
Not all systems have a way to tell that the strings really come from "fr".
The "application locale" is fr-CH, and the is used for everything.
So you never get weird mixtures like French strings + German dates.
But I think that we should do better than to format using the same locale as the translation.
Not the same locale, but not 100% independent either.
I can explain how that works in Android, for example.
Cheers,
Mihai
|
About extended plurals, like:
I am quite reluctant about it. And it was a huge problem for proper localization. |
@MickMonaghan I agree. Actually, currency formatting that I've been involved with disallows this scenario. Currency formatting is a measured unit and not a number. The unit has to be explicitly defined outside of the current message. |
I agree with @mihnita. Such translations are rejected by the Mozilla L10n Drivers and the logic we use is that this is not a plural-based variant of the same string, but a set of separate strings, and which one to use should depend on some other selector than a localizer trying to build a selection like in the example. |
It's been 12 years already... I think it's safe to say it will never be fully supported? :) And it's not just CAT tools, it's also TMSes. There are dozens of both these products on the market and some of the top players are not known to move very quickly.
Developing a new format can be quite challenging to have broad support (XLIFF is a good example). I still believe it would be a lot simple if we can find a way to remain format agnostic. Another advantage if we can stay format agonistic is that most TMSes can support multi-level filter when parsing strings which means, you could have an HTML document with MessageFormat strings inside and they could be both parsed and presented correctly to linguists. This could also work the other way around.
Exactly, this is the biggest challenge - most linguistic tools expect symmetric keys in both the input and output and one input can have multiple outputs in multiple languages that have different rules. This is also why MessageFormat works well, regardless of the file format.
I tried Google docs to have conversations in the past and so far Git seems better - I would still love to propose having our own Slack at some point if we start having more active conversations but Git is also good at keeping everything documented. I just tagged you in this new thread when you have a chance!
Is there a reason for this? I wrote a parser that preserves both whitespaces. I used this both for syntax highlighting and also auto-completion/validation & error detection. It's a lot easier to be able to refer to a character position without changing the input for example.
+1 on your comment - there are other ways to provide comments (typically called context) to linguists which handled correctly today by most TMSes. If we need inline context, there might be something too complex with the syntax. |
Closing resolve-candidates per discussion in 2023-07-24 call |
List of requirements to consider for MF
The text was updated successfully, but these errors were encountered: