GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
UNICODE_FROM_STRING_GET_TEXT
+
Point of view
All features
ANY
RECYCLING_POOL
STRING_HANDLER
STRING_RECYCLING_POOL
FILTER_GET_TEXT
All features
deferred class UNICODE_FROM_STRING_GET_TEXT
Summary
top
Reads UNICODE_STRINGs from a catalog of UTF-8 encoded messages
Direct parents
Inherit list:
FILTER_GET_TEXT
Overview
top
Features
{
ANY
}
connect_to
(filtered_:
GET_TEXT
[
STRING
])
{
ANY
}
translation
(message:
STRING
):
UNICODE_STRING
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
):
UNICODE_STRING
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
[
STRING
]
{
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
.
{
ANY
}
text_domain
:
STRING
The default text domain (namespace in which messages are looked up)
connect_to
(filtered_:
GET_TEXT
[
STRING
])
effective procedure
{
ANY
}
top
require
filtered_ /= Void
translation
(message:
STRING
):
UNICODE_STRING
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
):
UNICODE_STRING
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
effective 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
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
ensure
Result implies
filtered
.text_domain_code_set(domain_name).same_as("utf-8")
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
[
STRING
]
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_
text_domain
:
STRING
deferred function
{
ANY
}
top
The default text domain (namespace in which messages are looked up)