Project

General

Profile

Feature #7044

modify the 'After' and 'Before' language terms to use the %s parameter

Added by Hubert Borderiou almost 5 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Translations
Target version:
Start date:
28/03/2014
Due date:
% Done:

0%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

(source https://github.com/chamilo/chamilo-lms/commit/044b39d98f508c71e47d42d5e69738af7a1b98fd#commitcomment-5657332)

"for language terms composed of several elements, please always try to use a language variable with a "%s" in its contents, so it can be printed with printf() with the variable inside it.
This allows us to reach asian languages, which might put the preposition after the term"

modify the 'After' language term to use the %s parameter and modify all the use of get_lang('After') and all the translation in the translation tool.

History

#1

Updated by Yannick Warnier almost 5 years ago

  • Target version set to 2.0
#2

Updated by Yannick Warnier almost 5 years ago

  • Subject changed from modify the 'After' language term to use the %s parameter to modify the 'After' and 'Before' language terms to use the %s parameter
As an explanation for anyone wanting to take this task, the changes required are:
  • Define a new language variables "AfterX" and "BeforeX" in translate.chamilo.org (I just did that, so no need to do it anymore)
  • Make the translation of this variable in English be "After %s" (same with Before) (I just did that)
  • replace all occurences of stuff like this: "get_lang('After').$thing" look like this: "sprintf(get_lang('AfterX'),$thing)"
  • replace all occurences of stuff like this: "get_lang('Before').$thing" look like this: "sprintf(get_lang('BeforeX'),$thing)"

Using the new variables, this can be done progressively without breaking anything.

#3

Updated by Yannick Warnier almost 3 years ago

  • Target version changed from 2.0 to 3.0

Also available in: Atom PDF