Proposal: Metadata syntax #334
Replies: 3 comments 5 replies
-
One way to express this with the current syntax would be to use markup elements, i.e. something like
with an implementation that can format this to some kind of parts structure that the |
Beta Was this translation helpful? Give feedback.
-
Let me add some information about this topic. You shouldn't really call it a plain string. It oversimplifies the discussion. You can start with a string that can be easily turned into a container of attributes. As you expand to a list of things and apply the same logic to each item, the string metaphor breaks down. For our use case, there are 3 main things to consider, which is almost the same as the proposal:
Text transformations, like capitalization, quoting and stuff like that are separate from inflection, which is primarily the focus in my list above. It's similar to what is mentioned in this proposal, but the reinflection through constraints is a separate topic than other text transformations. In my previous proposal I gave some examples of how to deal with some of this. I believe some people would call it, constraint logic programming. You can have a set of initial constraints set by the developer's code or database, and a set of output constraints defined by the translator. The rest of the markup goes along for the ride or is omitted when necessary. As you expand your work to other languages, you will also have to consider words that take on grammatical gender for more than one bound morpheme. This make simple string handling hard to leverage. As I recall in Arabic, "your employee" turns into one word that takes on the gender of the person in the second person with the gender of the object in the third person. To contrast this with Spanish, the gender of the possessive pronoun is deduced from the object instead of the audience in the second person. On a side note, this proposal highlights a great need for consistency in grammeme handling (the names for grammatical category values). Would you use "male" or "masculine" for checking or specifying the gender? How can you validate such values? We settled on masculine instead of male, since male implies physical gender, while masculine implies both grammatical gender and physical gender. I hope that this information helps. |
Beta Was this translation helpful? Give feedback.
-
This (and other discussions) also brings up a topic on string variants. I can see a need, at least in my use cases, where there are two distinct types of variants of a string:
To further complicate this, I could see that some variants (like plural form) could be done either way, based on workflow requirements of the content management tool. If someone creates a new string, and declares it to be a noun, then the authoring tool would want to encourage or enforce that the various plural forms for a given target language are provided. Asking a translator for five different plural forms is easier than asking for an MF2 string that can generate the five different plural forms. Of course, these could be consolidated into a single explicit variant MF2 string at build time. |
Beta Was this translation helpful? Give feedback.
-
There has been discussion lately about how and where to add string metadata/attributes/context. Some options have it placed as part of the string as an attribute. Others place it outside the string in the resource structure that is used to deliver a group of strings.
It seems to me that there are three classes of ancillary string information, that have distinct uses and requirements...
Types A and B are important to deliver to the runtime. Type C is probably important to removed before delivery to production.
Type A should follow the string around. If the string is embedded as a parameter in another string, it should be included as well. If the string is sent to a translation service, Type A should be considered part of the output of the service.
if a string with type A metadata is passed into a different MF2.0 string as a parameter, then the metadata about that string can be used in a match statement:
Type B has served its purpose once the string has been selected. It is appropriate to specify type B at the resource level, and not pass it around further.
Type C is important and valuable to track during development and release, but should be redacted before shipping to production. It is possible that this is never appropriate in the resource, and the right choice here is for the content management system to generate XLIFF, etc, withough MF2Resource as in intermediate.
Related Discussion on MF2 Resource repo
Old content...
Beta Was this translation helpful? Give feedback.
All reactions