The message catalogues of one bundle, by locale, and the provider t resolves through.
More...
#include <catalogue.hpp>
|
| void | add (std::string locale, Catalogue catalogue) |
| | Adds, or replaces, a locale's catalogue.
|
| std::vector< std::string > | locales () const |
| | The locales with a catalogue, sorted.
|
| std::vector< std::string > const & | problems () const noexcept |
| | What went wrong while loading: a catalogue left out, or a pattern dropped. Each line names the file.
|
| void | note (std::string line) |
| | Records a loading problem.
|
| std::optional< std::string > | lookup (std::string_view key, std::string_view locale) const |
| | A message's pattern in a locale: the exact locale's catalogue, then its language's (de-AT, then de).
|
| render::TranslationProvider | provider () const |
| | A provider over the catalogues as they are now. It shares them, so it stays valid after this object is gone, and does not see a later add.
|
The message catalogues of one bundle, by locale, and the provider t resolves through.
Definition at line 108 of file catalogue.hpp.
◆ add()
| void morph::ui::MessageCatalogues::add |
( |
std::string | locale, |
|
|
Catalogue | catalogue ) |
|
inline |
Adds, or replaces, a locale's catalogue.
- Parameters
-
| locale | The locale. |
| catalogue | Its messages. |
Definition at line 113 of file catalogue.hpp.
◆ locales()
| std::vector< std::string > morph::ui::MessageCatalogues::locales |
( |
| ) |
const |
|
inlinenodiscard |
The locales with a catalogue, sorted.
- Returns
- They.
Definition at line 121 of file catalogue.hpp.
◆ problems()
| std::vector< std::string > const & morph::ui::MessageCatalogues::problems |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
What went wrong while loading: a catalogue left out, or a pattern dropped. Each line names the file.
- Returns
- The lines.
Definition at line 133 of file catalogue.hpp.
◆ note()
| void morph::ui::MessageCatalogues::note |
( |
std::string | line | ) |
|
|
inline |
Records a loading problem.
- Parameters
-
| line | What went wrong, naming the file. |
Definition at line 137 of file catalogue.hpp.
◆ lookup()
| std::optional< std::string > morph::ui::MessageCatalogues::lookup |
( |
std::string_view | key, |
|
|
std::string_view | locale ) const |
|
inlinenodiscard |
A message's pattern in a locale: the exact locale's catalogue, then its language's (de-AT, then de).
- Parameters
-
| key | The message key. |
| locale | The BCP 47 locale. |
- Returns
- The pattern, or nothing; t then shows the fallback.
Definition at line 144 of file catalogue.hpp.
◆ provider()
The documentation for this class was generated from the following file: