Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Talk:Improving English language strings

From MoodleDocs
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Changing or creating a new lang string?

New strings were required in 1.x times when we did not have branches for translations. Since 2.0, for changes in master, structural and/or semantic modification of a string (such as adding or removing {$a} placeholders etc) is acceptable as such strings are highlighted in AMOS as outdated. Of course, if lang pack maintainers do not pay attention to it, mismatch can happen - but is is considered to be the lang pack bug.

When a new string is introduced, the old one should be deprecated or removed so that unused strings do not accumulate.

A) Basically I see it as (for master only issues):
  1. Any change is allowed (semantical or structural). It does not have sense to keep the old string because there won't be use for it when the new Moodle version is released. So we can forget about the old one 100%. Of course if the string is radically different, then it may have sense to create a new, completely different string (and proceed with next point).
  2. If for any reason we stop using any string (because a feature is out or because we have decided to create a new different string instead of change existing)), then:
    • if the old string is really specific (not suitable for reuse) we can safely proceed to delete it,.
    • If the string belongs to a plugin, IMO we can also proceed to delete it (reuse of plugin strings should not be allowed).
    • But, if the string is generic (may be reused) and it's not part of a plugin then the string must be deprecated.
B) And, for issues involving stables, only small semantical changes are allowed. No structural, no deprecation and no deletion. Ever. If still something different must be shown it will be, always, via new string. When applied to master, these changes will also imply the standard old string deprecation. No CPY instruction will be performed between the old and the new strings (safest, easier, consistent behavior, no matter there are some cases where the instruction may be acceptable. Stop overthinking. Now!).
--Eloy Lafuente (stronk7) (talk) 19:48, 5 March 2015 (AWST)

See also