GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
DYNAMIC_DOMAIN_GET_TEXT
+
Point of view
All features
ANY
FILTER_GET_TEXT
All features
class DYNAMIC_DOMAIN_GET_TEXT [E_]
Summary
top
Direct parents
Inherit list:
DOMAIN_GET_TEXT
Overview
top
Creation features
{
FILTER_GET_TEXT
}
make
(domain_name:
STRING
, filtered_:
GET_TEXT
[
ANY
])
Features
{}
make
(domain_name:
STRING
, filtered_:
GET_TEXT
[
ANY
])
{
ANY
}
text_domain
:
STRING
The default text domain (namespace in which messages are looked up)
{}
connect_to
(filtered_: GET_TEXT[E_])
{
ANY
}
translation
(message:
STRING
): E_
Translation of
message
into current locale
The translation is looked up in the default text domain.
{
FILTER_GET_TEXT
}
domain_translation
(domain_name:
STRING
, message:
STRING
): E_
Translation of
message
into current locale
The translation is looked up in the text domain
domain_name
.
{
ANY
}
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
{}
filtered
: GET_TEXT[E_]
{
ANY
}
message_locale
:
STRING
The locale (roughly, the language) in which the program should output messages.
is_message_locale_set
:
BOOLEAN
{
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
.
{}
filter_domain_if_needed
(filtered_: GET_TEXT[I_]): GET_TEXT[I_]
Return
filtered_
wrapped, if necessary, in a
DYNAMIC_DOMAIN_GET_TEXT
.
make
(domain_name:
STRING
, filtered_:
GET_TEXT
[
ANY
])
effective procedure
{}
top
text_domain
:
STRING
writable attribute
{
ANY
}
top
The default text domain (namespace in which messages are looked up)
connect_to
(filtered_: GET_TEXT[E_])
effective procedure
{}
top
require
filtered_ /= Void
ensure
filtered
= filtered_
translation
(message:
STRING
): E_
effective 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))
domain_translation
(domain_name:
STRING
, message:
STRING
): E_
effective 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)
is_text_domain_set
:
BOOLEAN
is True
constant attribute
{
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
effective 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
effective function
{
ANY
}
top
The encoding of the
Result
of
xxx_translation
require
domain_name /= Void
filtered
: GET_TEXT[E_]
writable attribute
{}
top
ensure
Result /= Void
message_locale
:
STRING
effective function
{
ANY
}
top
The locale (roughly, the language) in which the program should output messages.
is_message_locale_set
:
BOOLEAN
effective function
{
ANY
}
top
ensure
Result = message_locale /= Void
register_domain
(domain_name:
STRING
)
effective 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
.
filter_domain_if_needed
(filtered_: GET_TEXT[I_]): GET_TEXT[I_]
effective function
{}
top
Return
filtered_
wrapped, if necessary, in a
DYNAMIC_DOMAIN_GET_TEXT
.
require
filtered_ /= Void
ensure
Result /= Void
Result.text_domain.is_equal(
text_domain
)
filtered_.text_domain.is_equal(
text_domain
) implies Result = filtered_