w3c / w3c/string-meta

Should we expect all strings to have direction metadata?

Open
#66 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
16
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Let's consider a practical scenario where we have a message file containing all the 2,000 natural language strings needed for an Arabic translation of an application's UI and error messages. Let's imagine that the message set contains 10 strings which would produce the wrong direction if first-strong heuristics were applied, or if all strings were expected to have a RTL base direction (eg. Arabic strings that begin with Latin characters, or Mac addresses, or untranslated strings, etc.)

My understanding of what we say in string-meta is that it should be possible to associate direction metadata with all strings in a string set. However, we don't require, or expect every string to have direction metadata. We do, however, expect every string that differs from the default to have direction metadata explicitly assigned to it.

This applies if the message set as a whole has a way to set a default direction for all strings. In this case, this would probably be a file-wide field near the top of the file setting the default base direction for all strings as RTL. Strings that shouldn't have a RTL base direction, must each be labelled for direction (LTR), to override the default setting.

I think that we also say this for strings when there is no default declared at the top of the file. This is on the assumption that, in the absence of direction information, the consumer will use first-strong heuristics to determine the direction. Again, any string that won't produce the correct result via those heuristics will need to have direction metadata associated with it.

While it is not a problem if every string is labelled for direction, i think that the reason for not requiring that is as follows: if every string in the resource has to be labelled, that has to be done by human intervention. A machine is not capable of identifying all 10 strings that should have a LTR base direction. (If a machine could do that, we wouldn't need direction metadata anyway, because the consumer would be able to simply apply the appropriate heuristics.) Therefore, correct labelling requires human intervention. It seems to me that requiring 1,990 strings in a set of 2,000 to be explicitly labelled by hand is too much to ask. Labelling just the 10 strings that would produce incorrect results, however, is achievable and essential.

Note also that requiring every string to have direction metadata explicitly assigned would also invalidate the usefulness of a resource-wide rule or field that sets the default direction (by making it redundant).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing issue #66 and its examples of default direction, first-strong heuristics, and per-string overrides. Compare the stated expectations with the existing string-meta guidance; done means reaching and recording an unambiguous requirement about when direction metadata is needed.

Written by the indexing model from the issue text.

Assessment

Domain
internationalization, localization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.