Zen

Translation

time(h, m) => What Time Is It?
English
TRANS: The rules to print the time in the localized language. Example syntax: time(h, 15) => a quarter to hour(h) am_pm(h) | The left hand side of the rule defines a pattern with a variable 'h' and a value '15'. The right hand side, when applied, will use the text "a quarter to " and call the first rule matching hour(h) after substituting the variable 'h' by its value, and call the rule matching am_pm(h). Internal spaces are significant on the right side of a rule. In calls, all arguments which are not numbers are considered to be variables. The rule parser is very simple and will let many syntax errors go ignored. A rule ends with the character '|'. The character '_' is a anonymous variable. The character '#' can be used to concatenate two text fragments. For instance: plural(1) => | plural(_) => s | hour(h) => number(h) hour#plural(h) | Use '\#' to use a # character, for instance in a pango color tag like <span foreground="\#FF0055"> You can put range conditions on firing a rule, with the syntax [var1 < var2] or [var1 < var2 < var3]. For instance: hours(h) [h < 12] => in the morning | hours(h) [12 < h < 18] => in the afternoon | hours(_) => in the night | These rules will be called with the root pattern "time(hour, minute)", with the variable 'hour' bound to the current hour and the variable 'minute' to the current minute. Order of rules is important. Rules are tried from first to last. So most precise rule must be placed first in the list. You can validate your set of rules by running the command line: python timewriter.py LANG You should use pango markup to respect the same colors as for the clock hands. Look at the README file from the activity for explanations on how to create rules.
Context English Haitian Actions
 
 
 
Context English Haitian Actions
 
 
 
 

Loading…

User avatar None

String updated in the repository

11 months ago
Browse all string changes

Things to check

Starting spaces

Source and translation do not both start with same number of spaces

Fix string

Reset

Mismatching line breaks

Number of new lines in translation does not match source

Reset

Glossary

English Haitian
No related strings found in the glossary.

String information

Context
time(h, m) => What Time Is It?
Source string description
TRANS: The rules to print the time in the localized language. Example syntax: time(h, 15) => a quarter to hour(h) am_pm(h) | The left hand side of the rule defines a pattern with a variable 'h' and a value '15'. The right hand side, when applied, will use the text "a quarter to " and call the first rule matching hour(h) after substituting the variable 'h' by its value, and call the rule matching am_pm(h). Internal spaces are significant on the right side of a rule. In calls, all arguments which are not numbers are considered to be variables. The rule parser is very simple and will let many syntax errors go ignored. A rule ends with the character '|'. The character '_' is a anonymous variable. The character '#' can be used to concatenate two text fragments. For instance: plural(1) => | plural(_) => s | hour(h) => number(h) hour#plural(h) | Use '\#' to use a # character, for instance in a pango color tag like <span foreground="\#FF0055"> You can put range conditions on firing a rule, with the syntax [var1 < var2] or [var1 < var2 < var3]. For instance: hours(h) [h < 12] => in the morning | hours(h) [12 < h < 18] => in the afternoon | hours(_) => in the night | These rules will be called with the root pattern "time(hour, minute)", with the variable 'hour' bound to the current hour and the variable 'minute' to the current minute. Order of rules is important. Rules are tried from first to last. So most precise rule must be placed first in the list. You can validate your set of rules by running the command line: python timewriter.py LANG You should use pango markup to respect the same colors as for the clock hands. Look at the README file from the activity for explanations on how to create rules.
Source string location
timewriter.py:204
String age
11 months ago
Last updated
11 months ago
Source string age
11 months ago
Translation file
po/ht.po, string 21