GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
NUMBER_GET_TEXT
+
Point of view
All features
ANY
FILTER_GET_TEXT
All features
deferred class NUMBER_GET_TEXT [E_]
Summary
top
Direct parents
Inherit list:
GET_TEXT
Known children
Inherit list:
DUMMY_GET_TEXT
,
GNU_GET_TEXT
Overview
top
Features
{
ANY
}
number_translation
(message_1:
STRING
, message_other:
STRING
, n:
INTEGER_32
):
ANY
{
FILTER_GET_TEXT
}
domain_translation
(domain_name:
STRING
, message:
STRING
):
ANY
Translation of
message
into current locale
The translation is looked up in the text domain
domain_name
.
domain_number_translation
(domain_name:
STRING
, message_1:
STRING
, message_other:
STRING
, n:
INTEGER_32
):
ANY
{
ANY
}
translation
(message:
STRING
): E_
Translation of
message
into current locale
The translation is looked up in the default text domain.
{
FILTER_GET_TEXT
}
register_domain
(domain_name:
STRING
)
Used by a
FILTER_GET_TEXT
to let the filtered
GET_TEXT
know that it will use the text domain
domain_name
.
{
ANY
}
message_locale
:
STRING
The locale (roughly, the language) in which the program should output messages.
is_message_locale_set
:
BOOLEAN
{
ANY
}
text_domain
:
STRING
The default text domain (namespace in which messages are looked up)
is_text_domain_set
:
BOOLEAN
Was a default text domain set?
is_text_domain_set_up
(domain_name:
STRING
):
BOOLEAN
Is
Current
ready to translate messages from domain
domain_name
?
{
ANY
}
text_domain_code_set
(domain_name:
STRING
):
STRING
The encoding of the
Result
of
xxx_translation
number_translation
(message_1:
STRING
, message_other:
STRING
, n:
INTEGER_32
):
ANY
deferred function
{
ANY
}
top
require
message_1.is_ascii
n >= 0
is_text_domain_set
is_message_locale_set
is_text_domain_set_up
(
text_domain
)
ensure
Result.is_equal(
domain_number_translation
(
text_domain
, message_1, message_other, n))
domain_translation
(domain_name:
STRING
, message:
STRING
):
ANY
deferred function
{
FILTER_GET_TEXT
}
top
Translation of
message
into current locale
The translation is looked up in the text domain
domain_name
.
See also:
set_message_locale
require
message.is_ascii
is_message_locale_set
is_text_domain_set_up(domain_name)
ensure
Result.is_equal(
domain_number_translation
(domain_name, message, message, 1))
domain_number_translation
(domain_name:
STRING
, message_1:
STRING
, message_other:
STRING
, n:
INTEGER_32
):
ANY
deferred function
{
FILTER_GET_TEXT
}
top
require
message_1.is_ascii
n >= 0
is_message_locale_set
is_text_domain_set_up
(domain_name)
translation
(message:
STRING
): E_
deferred function
{
ANY
}
top
Translation of
message
into current locale
The translation is looked up in the default text domain.
See also:
set_message_locale
require
message.is_ascii
is_text_domain_set
is_message_locale_set
is_text_domain_set_up
(
text_domain
)
ensure
Result.is_equal(
domain_translation
(
text_domain
, message))
register_domain
(domain_name:
STRING
)
deferred procedure
{
FILTER_GET_TEXT
}
top
Used by a
FILTER_GET_TEXT
to let the filtered
GET_TEXT
know that it will use the text domain
domain_name
.
message_locale
:
STRING
deferred function
{
ANY
}
top
The locale (roughly, the language) in which the program should output messages.
is_message_locale_set
:
BOOLEAN
deferred function
{
ANY
}
top
ensure
Result =
message_locale
/= Void
text_domain
:
STRING
deferred function
{
ANY
}
top
The default text domain (namespace in which messages are looked up)
is_text_domain_set
:
BOOLEAN
deferred function
{
ANY
}
top
Was a default text domain set?
ensure
Result implies not
text_domain
.is_empty
is_text_domain_set_up
(domain_name:
STRING
):
BOOLEAN
deferred function
{
ANY
}
top
Is
Current
ready to translate messages from domain
domain_name
?
The precise way of setting up a domain varies between implementations but will typically involve loading a message catalog.
require
domain_name /= Void
text_domain_code_set
(domain_name:
STRING
):
STRING
deferred function
{
ANY
}
top
The encoding of the
Result
of
xxx_translation
require
domain_name /= Void