-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(i18n): ✨ feature-gated translators
- Loading branch information
1 parent
24f4362
commit a123f0d
Showing
3 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
/// Errors for translators. These are separate so new translators can easily be created in a modular fashion. | ||
pub mod errors; | ||
mod fluent; | ||
|
||
// We export each translator by name | ||
#[cfg(feature = "translator-fluent")] | ||
mod fluent; | ||
#[cfg(feature = "translator-fluent")] | ||
pub use fluent::{FluentTranslator, FLUENT_TRANSLATOR_FILE_EXT}; | ||
|
||
// And then we export defaults using feature gates | ||
// TODO feature-gate these lines | ||
#[cfg(feature = "translator-dflt-fluent")] | ||
pub use FluentTranslator as Translator; | ||
#[cfg(feature = "translator-dflt-fluent")] | ||
pub use FLUENT_TRANSLATOR_FILE_EXT as TRANSLATOR_FILE_EXT; |