Creates a new timeline. Timelines allow tests to support multiple languages.
new_timeline(x = stop("x not supplied"), dict = NULL, default_lang = "en")
Expression defining a series of test elements.
This expression will be evaluated once for every language
provided in the dictionary argument (dict
).
A call to i18n(key)
, where key
is a term defined in dict
,
will be translated to its definitions in each respective language.
Dictionary object as created by i18n_dict$new
.
If no dictionary is supplied, then
new_timeline()
assumes that the current language is
default_lang
. This language should be specified by a lower-case string,
e.g. 'en', as usual.
Debugging is difficult within new_timeline()
because of its underlying macro definition.
When building a test, we recommend defining small timelines
first and subsequently combining them.
This helps to narrow down the source of any errors.