diff --git a/api/main/404.html b/api/main/404.html index bcd9003..8c9330e 100644 --- a/api/main/404.html +++ b/api/main/404.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ diff --git a/api/main/Rosetta.html b/api/main/Rosetta.html index e149729..74ee277 100644 --- a/api/main/Rosetta.html +++ b/api/main/Rosetta.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -398,294 +398,294 @@

- + rosetta/aliases.cr
- + rosetta/annotations.cr
- + rosetta/backend.cr
- + rosetta/config.cr
- + rosetta/configuration.cr
- + rosetta/interpolation.cr
- + rosetta/localizable.cr
- + rosetta/localization.cr
- + rosetta/lucky/integration.cr
- + rosetta/parser.cr
- + rosetta/parser/builder.cr
- + rosetta/parser/checks.cr
- + rosetta/parser/config.cr
- + rosetta/pluralization.cr
- + rosetta/pluralization/rule.cr
- + rosetta/pluralization/rule/arabic.cr
- + rosetta/pluralization/rule/breton.cr
- + rosetta/pluralization/rule/central_morocco_tamazight.cr
- + rosetta/pluralization/rule/colognian.cr
- + rosetta/pluralization/rule/east_slavic.cr
- + rosetta/pluralization/rule/irish.cr
- + rosetta/pluralization/rule/langi.cr
- + rosetta/pluralization/rule/latvian.cr
- + rosetta/pluralization/rule/lithuanian.cr
- + rosetta/pluralization/rule/macedonian.cr
- + rosetta/pluralization/rule/maltese.cr
- + rosetta/pluralization/rule/manx.cr
- + rosetta/pluralization/rule/one_other.cr
- + rosetta/pluralization/rule/one_two_other.cr
- + rosetta/pluralization/rule/one_up_to_two_other.cr
- + rosetta/pluralization/rule/one_with_zero_other.cr
- + rosetta/pluralization/rule/other.cr
- + rosetta/pluralization/rule/polish.cr
- + rosetta/pluralization/rule/romanian.cr
- + rosetta/pluralization/rule/scottish_gaelic.cr
- + rosetta/pluralization/rule/slovenian.cr
- + rosetta/pluralization/rule/upper_sorbian.cr
- + rosetta/pluralization/rule/welsh.cr
- + rosetta/pluralization/rule/west_slavic.cr
- + rosetta/translatable.cr
- + rosetta/translation.cr
- + rosetta/version.cr @@ -799,8 +799,6 @@

- -

+ +
@@ -896,7 +896,7 @@


- [View source] + [View source]
@@ -918,7 +918,7 @@


- [View source] + [View source]
@@ -940,7 +940,7 @@


- [View source] + [View source]
@@ -962,7 +962,7 @@


- [View source] + [View source]
@@ -984,7 +984,7 @@


- [View source] + [View source]
@@ -1000,7 +1000,7 @@


- [View source] + [View source]
@@ -1021,7 +1021,7 @@


- [View source] + [View source]
@@ -1049,7 +1049,7 @@


- [View source] + [View source]
@@ -1077,7 +1077,7 @@


- [View source] + [View source]
@@ -1098,7 +1098,7 @@


- [View source] + [View source]
@@ -1106,8 +1106,6 @@

- -


- [View source] + [View source]
@@ -1158,7 +1156,7 @@


- [View source] + [View source]
@@ -1179,7 +1177,7 @@


- [View source] + [View source]
@@ -1202,7 +1200,7 @@


- [View source] + [View source]
@@ -1225,7 +1223,7 @@


- [View source] + [View source]
@@ -1249,13 +1247,15 @@


- [View source] + [View source]
+ + diff --git a/api/main/Rosetta/AvailableLocales.html b/api/main/Rosetta/AvailableLocales.html index 39f5c25..e21e79a 100644 --- a/api/main/Rosetta/AvailableLocales.html +++ b/api/main/Rosetta/AvailableLocales.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- annotation Rosetta::AvailableLocales + annotation Rosetta::AvailableLocales

@@ -398,7 +398,7 @@

- + rosetta/annotations.cr diff --git a/api/main/Rosetta/Backend.html b/api/main/Rosetta/Backend.html index 520e46f..974e6c9 100644 --- a/api/main/Rosetta/Backend.html +++ b/api/main/Rosetta/Backend.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- module Rosetta::Backend + module Rosetta::Backend

@@ -398,7 +398,7 @@

- + rosetta/backend.cr @@ -413,8 +413,6 @@

- -

+ +
@@ -445,8 +445,6 @@

- -


+ +

diff --git a/api/main/Rosetta/Config.html b/api/main/Rosetta/Config.html index 4236611..870f0db 100644 --- a/api/main/Rosetta/Config.html +++ b/api/main/Rosetta/Config.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- class Rosetta::Config + class Rosetta::Config

@@ -400,7 +400,7 @@

- + rosetta/config.cr @@ -415,6 +415,8 @@

+ +

- - @@ -522,15 +530,13 @@


- - diff --git a/api/main/Rosetta/CountArg.html b/api/main/Rosetta/CountArg.html index 4bba8f9..d43ad2a 100644 --- a/api/main/Rosetta/CountArg.html +++ b/api/main/Rosetta/CountArg.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- alias Rosetta::CountArg + alias Rosetta::CountArg

@@ -408,7 +408,7 @@

- + rosetta/aliases.cr diff --git a/api/main/Rosetta/DefaultLocale.html b/api/main/Rosetta/DefaultLocale.html index 7cee344..f5bce9e 100644 --- a/api/main/Rosetta/DefaultLocale.html +++ b/api/main/Rosetta/DefaultLocale.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- annotation Rosetta::DefaultLocale + annotation Rosetta::DefaultLocale

@@ -398,7 +398,7 @@

- + rosetta/annotations.cr diff --git a/api/main/Rosetta/DefaultPluralizationRules.html b/api/main/Rosetta/DefaultPluralizationRules.html index d7bf2a0..b0c1293 100644 --- a/api/main/Rosetta/DefaultPluralizationRules.html +++ b/api/main/Rosetta/DefaultPluralizationRules.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- annotation Rosetta::DefaultPluralizationRules + annotation Rosetta::DefaultPluralizationRules

@@ -398,7 +398,7 @@

- + rosetta/annotations.cr diff --git a/api/main/Rosetta/FallbackRules.html b/api/main/Rosetta/FallbackRules.html index fcaae5b..b893ef6 100644 --- a/api/main/Rosetta/FallbackRules.html +++ b/api/main/Rosetta/FallbackRules.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- annotation Rosetta::FallbackRules + annotation Rosetta::FallbackRules

@@ -398,7 +398,7 @@

- + rosetta/annotations.cr diff --git a/api/main/Rosetta/Fallbacks.html b/api/main/Rosetta/Fallbacks.html index 914cc6f..21e305b 100644 --- a/api/main/Rosetta/Fallbacks.html +++ b/api/main/Rosetta/Fallbacks.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- alias Rosetta::Fallbacks + alias Rosetta::Fallbacks

@@ -408,7 +408,7 @@

- + rosetta/aliases.cr diff --git a/api/main/Rosetta/InterpolatedTranslation.html b/api/main/Rosetta/InterpolatedTranslation.html index 0b6ffb7..2fc328a 100644 --- a/api/main/Rosetta/InterpolatedTranslation.html +++ b/api/main/Rosetta/InterpolatedTranslation.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- module Rosetta::InterpolatedTranslation + module Rosetta::InterpolatedTranslation

@@ -409,7 +409,7 @@

- + rosetta/translation.cr @@ -424,6 +424,8 @@

+ +

- -
@@ -456,6 +456,8 @@

+ +


- -

diff --git a/api/main/Rosetta/InterpolationArgumentException.html b/api/main/Rosetta/InterpolationArgumentException.html index 1a2d732..74d607c 100644 --- a/api/main/Rosetta/InterpolationArgumentException.html +++ b/api/main/Rosetta/InterpolationArgumentException.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- class Rosetta::InterpolationArgumentException + class Rosetta::InterpolationArgumentException

@@ -400,7 +400,7 @@

- + rosetta/interpolation.cr @@ -430,12 +430,18 @@

+ + + + + + @@ -446,6 +452,9 @@

+ + + diff --git a/api/main/Rosetta/Localizable.html b/api/main/Rosetta/Localizable.html index c280d10..cec1e79 100644 --- a/api/main/Rosetta/Localizable.html +++ b/api/main/Rosetta/Localizable.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- module Rosetta::Localizable + module Rosetta::Localizable

@@ -409,7 +409,7 @@

- + rosetta/localizable.cr @@ -425,42 +425,33 @@

- + - Instance Method Summary + Macro Summary

@@ -725,7 +736,7 @@


@@ -741,7 +752,7 @@


@@ -757,7 +768,7 @@


@@ -773,7 +784,7 @@


@@ -794,7 +805,7 @@


@@ -810,7 +821,7 @@


- [View source] + [View source]
@@ -826,7 +837,7 @@


- [View source] + [View source]
@@ -842,7 +853,7 @@


- [View source] + [View source]
@@ -858,7 +869,7 @@


- [View source] + [View source]
@@ -874,15 +885,13 @@


- [View source] + [View source]
- - diff --git a/api/main/Rosetta/Parser/Builder.html b/api/main/Rosetta/Parser/Builder.html index e89dd44..63c4409 100644 --- a/api/main/Rosetta/Parser/Builder.html +++ b/api/main/Rosetta/Parser/Builder.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- class Rosetta::Parser::Builder + class Rosetta::Parser::Builder

@@ -400,7 +400,7 @@

- + rosetta/parser/builder.cr @@ -432,6 +432,8 @@

+ +

- - @@ -515,6 +521,8 @@

+ +


@@ -556,15 +564,13 @@


- [View source] + [View source]
- - diff --git a/api/main/Rosetta/Parser/Checks.html b/api/main/Rosetta/Parser/Checks.html index cee38be..ced4481 100644 --- a/api/main/Rosetta/Parser/Checks.html +++ b/api/main/Rosetta/Parser/Checks.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- module Rosetta::Parser::Checks + module Rosetta::Parser::Checks

@@ -412,7 +412,7 @@

- + rosetta/parser/checks.cr diff --git a/api/main/Rosetta/Parser/Config.html b/api/main/Rosetta/Parser/Config.html index 52d7117..b783d43 100644 --- a/api/main/Rosetta/Parser/Config.html +++ b/api/main/Rosetta/Parser/Config.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- class Rosetta::Parser::Config + class Rosetta::Parser::Config

@@ -414,7 +414,7 @@

- + rosetta/parser/config.cr @@ -446,6 +446,8 @@

+ +

- - @@ -557,6 +566,8 @@

+ +


@@ -593,7 +604,7 @@


@@ -609,7 +620,7 @@


- [View source] + [View source]
@@ -625,7 +636,7 @@


- [View source] + [View source]
@@ -641,7 +652,7 @@


- [View source] + [View source]
@@ -657,15 +668,13 @@


- [View source] + [View source]
- - diff --git a/api/main/Rosetta/Pluralization.html b/api/main/Rosetta/Pluralization.html index 6345115..6270323 100644 --- a/api/main/Rosetta/Pluralization.html +++ b/api/main/Rosetta/Pluralization.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- module Rosetta::Pluralization + module Rosetta::Pluralization

@@ -398,182 +398,182 @@

- + rosetta/pluralization.cr
- + rosetta/pluralization/rule.cr
- + rosetta/pluralization/rule/arabic.cr
- + rosetta/pluralization/rule/breton.cr
- + rosetta/pluralization/rule/central_morocco_tamazight.cr
- + rosetta/pluralization/rule/colognian.cr
- + rosetta/pluralization/rule/east_slavic.cr
- + rosetta/pluralization/rule/irish.cr
- + rosetta/pluralization/rule/langi.cr
- + rosetta/pluralization/rule/latvian.cr
- + rosetta/pluralization/rule/lithuanian.cr
- + rosetta/pluralization/rule/macedonian.cr
- + rosetta/pluralization/rule/maltese.cr
- + rosetta/pluralization/rule/manx.cr
- + rosetta/pluralization/rule/one_other.cr
- + rosetta/pluralization/rule/one_two_other.cr
- + rosetta/pluralization/rule/one_up_to_two_other.cr
- + rosetta/pluralization/rule/one_with_zero_other.cr
- + rosetta/pluralization/rule/other.cr
- + rosetta/pluralization/rule/polish.cr
- + rosetta/pluralization/rule/romanian.cr
- + rosetta/pluralization/rule/scottish_gaelic.cr
- + rosetta/pluralization/rule/slovenian.cr
- + rosetta/pluralization/rule/upper_sorbian.cr
- + rosetta/pluralization/rule/welsh.cr
- + rosetta/pluralization/rule/west_slavic.cr diff --git a/api/main/Rosetta/Pluralization/CategoryTags.html b/api/main/Rosetta/Pluralization/CategoryTags.html index 7fe2e8f..3e84beb 100644 --- a/api/main/Rosetta/Pluralization/CategoryTags.html +++ b/api/main/Rosetta/Pluralization/CategoryTags.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- annotation Rosetta::Pluralization::CategoryTags + annotation Rosetta::Pluralization::CategoryTags

@@ -409,7 +409,7 @@

- + rosetta/pluralization/rule.cr diff --git a/api/main/Rosetta/Pluralization/Rule.html b/api/main/Rosetta/Pluralization/Rule.html index 9b87cae..f31fe59 100644 --- a/api/main/Rosetta/Pluralization/Rule.html +++ b/api/main/Rosetta/Pluralization/Rule.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- abstract struct Rosetta::Pluralization::Rule + abstract struct Rosetta::Pluralization::Rule

@@ -476,175 +476,175 @@

- + rosetta/pluralization/rule.cr
- + rosetta/pluralization/rule/arabic.cr
- + rosetta/pluralization/rule/breton.cr
- + rosetta/pluralization/rule/central_morocco_tamazight.cr
- + rosetta/pluralization/rule/colognian.cr
- + rosetta/pluralization/rule/east_slavic.cr
- + rosetta/pluralization/rule/irish.cr
- + rosetta/pluralization/rule/langi.cr
- + rosetta/pluralization/rule/latvian.cr
- + rosetta/pluralization/rule/lithuanian.cr
- + rosetta/pluralization/rule/macedonian.cr
- + rosetta/pluralization/rule/maltese.cr
- + rosetta/pluralization/rule/manx.cr
- + rosetta/pluralization/rule/one_other.cr
- + rosetta/pluralization/rule/one_two_other.cr
- + rosetta/pluralization/rule/one_up_to_two_other.cr
- + rosetta/pluralization/rule/one_with_zero_other.cr
- + rosetta/pluralization/rule/other.cr
- + rosetta/pluralization/rule/polish.cr
- + rosetta/pluralization/rule/romanian.cr
- + rosetta/pluralization/rule/scottish_gaelic.cr
- + rosetta/pluralization/rule/slovenian.cr
- + rosetta/pluralization/rule/upper_sorbian.cr
- + rosetta/pluralization/rule/welsh.cr
- + rosetta/pluralization/rule/west_slavic.cr @@ -676,6 +676,8 @@

+ +

- - @@ -767,6 +776,8 @@

+ +


@@ -803,15 +814,13 @@


- -

diff --git a/api/main/Rosetta/Pluralization/Rule/Arabic.html b/api/main/Rosetta/Pluralization/Rule/Arabic.html index 145d11e..87d50e0 100644 --- a/api/main/Rosetta/Pluralization/Rule/Arabic.html +++ b/api/main/Rosetta/Pluralization/Rule/Arabic.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::Arabic + struct Rosetta::Pluralization::Rule::Arabic

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/arabic.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/Breton.html b/api/main/Rosetta/Pluralization/Rule/Breton.html index 0977533..0ccae67 100644 --- a/api/main/Rosetta/Pluralization/Rule/Breton.html +++ b/api/main/Rosetta/Pluralization/Rule/Breton.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::Breton + struct Rosetta::Pluralization::Rule::Breton

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/breton.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/CentralMoroccoTamazight.html b/api/main/Rosetta/Pluralization/Rule/CentralMoroccoTamazight.html index c46b20f..ea0b2fe 100644 --- a/api/main/Rosetta/Pluralization/Rule/CentralMoroccoTamazight.html +++ b/api/main/Rosetta/Pluralization/Rule/CentralMoroccoTamazight.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::CentralMoroccoTamazight + struct Rosetta::Pluralization::Rule::CentralMoroccoTamazight

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/central_morocco_tamazight.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/Colognian.html b/api/main/Rosetta/Pluralization/Rule/Colognian.html index fe079e3..82ee29e 100644 --- a/api/main/Rosetta/Pluralization/Rule/Colognian.html +++ b/api/main/Rosetta/Pluralization/Rule/Colognian.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::Colognian + struct Rosetta::Pluralization::Rule::Colognian

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/colognian.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/EastSlavic.html b/api/main/Rosetta/Pluralization/Rule/EastSlavic.html index f3d6435..cfcdaa8 100644 --- a/api/main/Rosetta/Pluralization/Rule/EastSlavic.html +++ b/api/main/Rosetta/Pluralization/Rule/EastSlavic.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::EastSlavic + struct Rosetta::Pluralization::Rule::EastSlavic

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/east_slavic.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/Irish.html b/api/main/Rosetta/Pluralization/Rule/Irish.html index 56c6411..b022ae6 100644 --- a/api/main/Rosetta/Pluralization/Rule/Irish.html +++ b/api/main/Rosetta/Pluralization/Rule/Irish.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::Irish + struct Rosetta::Pluralization::Rule::Irish

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/irish.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/Langi.html b/api/main/Rosetta/Pluralization/Rule/Langi.html index ed911aa..e68cad1 100644 --- a/api/main/Rosetta/Pluralization/Rule/Langi.html +++ b/api/main/Rosetta/Pluralization/Rule/Langi.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::Langi + struct Rosetta::Pluralization::Rule::Langi

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/langi.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/Latvian.html b/api/main/Rosetta/Pluralization/Rule/Latvian.html index 9e533c4..78a711c 100644 --- a/api/main/Rosetta/Pluralization/Rule/Latvian.html +++ b/api/main/Rosetta/Pluralization/Rule/Latvian.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::Latvian + struct Rosetta::Pluralization::Rule::Latvian

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/latvian.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/Lithuanian.html b/api/main/Rosetta/Pluralization/Rule/Lithuanian.html index 0f2992c..787d242 100644 --- a/api/main/Rosetta/Pluralization/Rule/Lithuanian.html +++ b/api/main/Rosetta/Pluralization/Rule/Lithuanian.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::Lithuanian + struct Rosetta::Pluralization::Rule::Lithuanian

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/lithuanian.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/Macedonian.html b/api/main/Rosetta/Pluralization/Rule/Macedonian.html index 2eac809..2b6563e 100644 --- a/api/main/Rosetta/Pluralization/Rule/Macedonian.html +++ b/api/main/Rosetta/Pluralization/Rule/Macedonian.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::Macedonian + struct Rosetta::Pluralization::Rule::Macedonian

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/macedonian.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/Maltese.html b/api/main/Rosetta/Pluralization/Rule/Maltese.html index 7426f6e..c18cfe4 100644 --- a/api/main/Rosetta/Pluralization/Rule/Maltese.html +++ b/api/main/Rosetta/Pluralization/Rule/Maltese.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::Maltese + struct Rosetta::Pluralization::Rule::Maltese

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/maltese.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/Manx.html b/api/main/Rosetta/Pluralization/Rule/Manx.html index 9057d30..0b69555 100644 --- a/api/main/Rosetta/Pluralization/Rule/Manx.html +++ b/api/main/Rosetta/Pluralization/Rule/Manx.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::Manx + struct Rosetta::Pluralization::Rule::Manx

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/manx.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/OneOther.html b/api/main/Rosetta/Pluralization/Rule/OneOther.html index e23b60c..59caa38 100644 --- a/api/main/Rosetta/Pluralization/Rule/OneOther.html +++ b/api/main/Rosetta/Pluralization/Rule/OneOther.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::OneOther + struct Rosetta::Pluralization::Rule::OneOther

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/one_other.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/OneTwoOther.html b/api/main/Rosetta/Pluralization/Rule/OneTwoOther.html index d9d3264..6761b5d 100644 --- a/api/main/Rosetta/Pluralization/Rule/OneTwoOther.html +++ b/api/main/Rosetta/Pluralization/Rule/OneTwoOther.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::OneTwoOther + struct Rosetta::Pluralization::Rule::OneTwoOther

@@ -413,7 +413,7 @@

- + rosetta/pluralization/rule/one_two_other.cr @@ -428,6 +428,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/OneUpToTwoOther.html b/api/main/Rosetta/Pluralization/Rule/OneUpToTwoOther.html index 12f9268..13f7490 100644 --- a/api/main/Rosetta/Pluralization/Rule/OneUpToTwoOther.html +++ b/api/main/Rosetta/Pluralization/Rule/OneUpToTwoOther.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::OneUpToTwoOther + struct Rosetta::Pluralization::Rule::OneUpToTwoOther

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/one_up_to_two_other.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/OneWithZeroOther.html b/api/main/Rosetta/Pluralization/Rule/OneWithZeroOther.html index 1745904..22c9b92 100644 --- a/api/main/Rosetta/Pluralization/Rule/OneWithZeroOther.html +++ b/api/main/Rosetta/Pluralization/Rule/OneWithZeroOther.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::OneWithZeroOther + struct Rosetta::Pluralization::Rule::OneWithZeroOther

@@ -413,7 +413,7 @@

- + rosetta/pluralization/rule/one_with_zero_other.cr @@ -428,6 +428,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/Other.html b/api/main/Rosetta/Pluralization/Rule/Other.html index bc66f3b..51b0fbf 100644 --- a/api/main/Rosetta/Pluralization/Rule/Other.html +++ b/api/main/Rosetta/Pluralization/Rule/Other.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::Other + struct Rosetta::Pluralization::Rule::Other

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/other.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/Polish.html b/api/main/Rosetta/Pluralization/Rule/Polish.html index b44bc13..f992a56 100644 --- a/api/main/Rosetta/Pluralization/Rule/Polish.html +++ b/api/main/Rosetta/Pluralization/Rule/Polish.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::Polish + struct Rosetta::Pluralization::Rule::Polish

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/polish.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/Romanian.html b/api/main/Rosetta/Pluralization/Rule/Romanian.html index b85a828..d72e4f2 100644 --- a/api/main/Rosetta/Pluralization/Rule/Romanian.html +++ b/api/main/Rosetta/Pluralization/Rule/Romanian.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::Romanian + struct Rosetta::Pluralization::Rule::Romanian

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/romanian.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/ScottishGaelic.html b/api/main/Rosetta/Pluralization/Rule/ScottishGaelic.html index 3059805..7064630 100644 --- a/api/main/Rosetta/Pluralization/Rule/ScottishGaelic.html +++ b/api/main/Rosetta/Pluralization/Rule/ScottishGaelic.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::ScottishGaelic + struct Rosetta::Pluralization::Rule::ScottishGaelic

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/scottish_gaelic.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/Slovenian.html b/api/main/Rosetta/Pluralization/Rule/Slovenian.html index 6f618e4..ac78640 100644 --- a/api/main/Rosetta/Pluralization/Rule/Slovenian.html +++ b/api/main/Rosetta/Pluralization/Rule/Slovenian.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::Slovenian + struct Rosetta::Pluralization::Rule::Slovenian

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/slovenian.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/UpperSorbian.html b/api/main/Rosetta/Pluralization/Rule/UpperSorbian.html index 563cdcf..38cba7a 100644 --- a/api/main/Rosetta/Pluralization/Rule/UpperSorbian.html +++ b/api/main/Rosetta/Pluralization/Rule/UpperSorbian.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::UpperSorbian + struct Rosetta::Pluralization::Rule::UpperSorbian

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/upper_sorbian.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/Welsh.html b/api/main/Rosetta/Pluralization/Rule/Welsh.html index 67134bd..f9fa6e7 100644 --- a/api/main/Rosetta/Pluralization/Rule/Welsh.html +++ b/api/main/Rosetta/Pluralization/Rule/Welsh.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::Welsh + struct Rosetta::Pluralization::Rule::Welsh

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/welsh.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/Pluralization/Rule/WestSlavic.html b/api/main/Rosetta/Pluralization/Rule/WestSlavic.html index 1f320b8..015e00a 100644 --- a/api/main/Rosetta/Pluralization/Rule/WestSlavic.html +++ b/api/main/Rosetta/Pluralization/Rule/WestSlavic.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- struct Rosetta::Pluralization::Rule::WestSlavic + struct Rosetta::Pluralization::Rule::WestSlavic

@@ -412,7 +412,7 @@

- + rosetta/pluralization/rule/west_slavic.cr @@ -427,6 +427,8 @@

+ +

- - - -

diff --git a/api/main/Rosetta/PluralizationRules.html b/api/main/Rosetta/PluralizationRules.html index f887977..288d51a 100644 --- a/api/main/Rosetta/PluralizationRules.html +++ b/api/main/Rosetta/PluralizationRules.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- annotation Rosetta::PluralizationRules + annotation Rosetta::PluralizationRules

@@ -398,7 +398,7 @@

- + rosetta/annotations.cr diff --git a/api/main/Rosetta/PluralizedTranslation.html b/api/main/Rosetta/PluralizedTranslation.html index 3b8bc55..af086ac 100644 --- a/api/main/Rosetta/PluralizedTranslation.html +++ b/api/main/Rosetta/PluralizedTranslation.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- module Rosetta::PluralizedTranslation + module Rosetta::PluralizedTranslation

@@ -409,7 +409,7 @@

- + rosetta/translation.cr @@ -424,6 +424,8 @@

+ +

- -
@@ -456,6 +456,8 @@

+ +


- -

diff --git a/api/main/Rosetta/SimpleTranslation.html b/api/main/Rosetta/SimpleTranslation.html index 0101085..55466cb 100644 --- a/api/main/Rosetta/SimpleTranslation.html +++ b/api/main/Rosetta/SimpleTranslation.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- module Rosetta::SimpleTranslation + module Rosetta::SimpleTranslation

@@ -409,7 +409,7 @@

- + rosetta/translation.cr @@ -424,6 +424,8 @@

+ +

- -
@@ -464,6 +464,8 @@

+ +


@@ -500,7 +502,7 @@


@@ -516,15 +518,13 @@


- - diff --git a/api/main/Rosetta/Translatable.html b/api/main/Rosetta/Translatable.html index 6970636..e312457 100644 --- a/api/main/Rosetta/Translatable.html +++ b/api/main/Rosetta/Translatable.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- module Rosetta::Translatable + module Rosetta::Translatable

@@ -409,7 +409,7 @@

- + rosetta/translatable.cr @@ -424,8 +424,6 @@

- -

+ +
@@ -456,8 +456,6 @@

- -


+ + diff --git a/api/main/Rosetta/Translatable/Config.html b/api/main/Rosetta/Translatable/Config.html index 717b91b..51ac501 100644 --- a/api/main/Rosetta/Translatable/Config.html +++ b/api/main/Rosetta/Translatable/Config.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- annotation Rosetta::Translatable::Config + annotation Rosetta::Translatable::Config

@@ -398,7 +398,7 @@

- + rosetta/translatable.cr diff --git a/api/main/Rosetta/Translation.html b/api/main/Rosetta/Translation.html index 5a86ab3..e2e2fbc 100644 --- a/api/main/Rosetta/Translation.html +++ b/api/main/Rosetta/Translation.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- abstract struct Rosetta::Translation + abstract struct Rosetta::Translation

@@ -411,7 +411,7 @@

- + rosetta/translation.cr @@ -443,6 +443,8 @@

+ +

- - @@ -541,6 +550,8 @@

+ +


@@ -582,7 +593,7 @@


@@ -598,15 +609,13 @@


- - diff --git a/api/main/Rosetta/Translations.html b/api/main/Rosetta/Translations.html index 5467b49..9ad3da2 100644 --- a/api/main/Rosetta/Translations.html +++ b/api/main/Rosetta/Translations.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- alias Rosetta::Translations + alias Rosetta::Translations

@@ -408,7 +408,7 @@

- + rosetta/parser.cr diff --git a/api/main/Rosetta/TranslationsHash.html b/api/main/Rosetta/TranslationsHash.html index 9083144..fa3b48b 100644 --- a/api/main/Rosetta/TranslationsHash.html +++ b/api/main/Rosetta/TranslationsHash.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- alias Rosetta::TranslationsHash + alias Rosetta::TranslationsHash

@@ -408,7 +408,7 @@

- + rosetta/parser.cr diff --git a/api/main/Rosetta/VariantsTranslation.html b/api/main/Rosetta/VariantsTranslation.html index 1b3dc24..9b84c08 100644 --- a/api/main/Rosetta/VariantsTranslation.html +++ b/api/main/Rosetta/VariantsTranslation.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ @@ -367,7 +367,7 @@

- module Rosetta::VariantsTranslation + module Rosetta::VariantsTranslation

@@ -409,7 +409,7 @@

- + rosetta/translation.cr @@ -424,6 +424,8 @@

+ +

- -
@@ -456,6 +456,8 @@

+ +


- -

diff --git a/api/main/css/style.css b/api/main/css/style.css index 2b91cf4..3d0a8a5 100644 --- a/api/main/css/style.css +++ b/api/main/css/style.css @@ -1,3 +1,7 @@ +:root { + color-scheme: light dark; +} + html, body { background: #FFFFFF; position: relative; @@ -729,6 +733,30 @@ img { max-width: 100%; } +table { + font-size: 14px; + display: block; + max-width: -moz-fit-content; + max-width: fit-content; + overflow-x: auto; + white-space: nowrap; + background: #fdfdfd; + text-align: center; + border: 1px solid #eee; + border-collapse: collapse; + padding: 0px 5px 0px 5px; +} + +table th { + padding: 10px; + letter-spacing: 1px; + border-bottom: 1px solid #eee; +} + +table td { + padding: 10px; +} + #sidebar-btn { height: 32px; width: 32px; @@ -794,10 +822,6 @@ img { } @media (prefers-color-scheme: dark) { - :root { - color-scheme: dark; - } - html, body { background: #1b1b1b; } @@ -824,6 +848,10 @@ img { border: 1px solid #353535; } + .project-versions-nav > option { + background-color: #222; + } + .superclass-hierarchy .superclass a, .superclass-hierarchy .superclass a:visited, .other-type a, @@ -935,13 +963,18 @@ img { color: white; } - pre { + pre, + table { color: white; background: #202020; border: 1px solid #353535; } + table th { + border-bottom: 1px solid #353535; + } + #sidebar-btn, #sidebar-btn-label { - color: white; + color: white; } } diff --git a/api/main/index.html b/api/main/index.html index 64fb040..2a5831f 100644 --- a/api/main/index.html +++ b/api/main/index.html @@ -4,7 +4,7 @@ - + @@ -24,7 +24,7 @@ diff --git a/api/main/index.json b/api/main/index.json index fb602ce..58cdf68 100644 --- a/api/main/index.json +++ b/api/main/index.json @@ -1 +1 @@ -{"repository_name":"Rosetta","body":"# Rosetta\n\n

\n \"Rosetta\n

\n\nA blazing fast internationalization (i18n) library for Crystal with compile-time\nkey lookup. You'll never have a `missing translation` in your app, ever again.\n\n![GitHub](https://img.shields.io/github/license/wout/rosetta)\n![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/wout/rosetta)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/wout/rosetta/ci.yml?branch=main)\n\n## Why use Rosetta?\n\n### You'll never have a missing translation\n\nRosetta is different from other internationalization libraries because it\nhandles key lookup at compile-time rather than runtime. The significant\nadvantage is that you'll be able to find missing translations - or typos in\nyour locale keys - during development rather than after you've deployed your\napp. This is also true for translation keys in all additional locales.\n\n### You'll never have a missing interpolation\n\nIn Rosetta, interpolation keys are arguments to the translation method. So if\nyou're missing an argument, the compiler will complain. The parser will also\ncompare interpolation keys in additional locales to the ones found in the\ndefault locale, and complain if some are missing.\n\n### Rosetta is more than 12x faster than similar libraries\n\nBenchmarking against other libraries which also use YAML or JSON backends,\nRosetta is 12x to 700x faster than any other one.\n\nFor simple translations:\n\n```\ncrimson-knight/i18n.cr translation 303.57k ( 3.29µs) (± 4.62%) 801B/op 702.21× slower\n crystal-i18n/i18n translation 18.07M ( 55.35ns) (± 7.28%) 48.0B/op 12.39× slower\n syeopite/lens translation 5.09M (196.47ns) (± 4.60%) 176B/op 43.98× slower\n wout/rosetta translation 223.86M ( 4.47ns) (± 2.20%) 0.0B/op fastest\n```\n\nFor translations with interpolations:\n\n```\ncrimson-knight/i18n.cr interpolation 318.12k ( 3.14µs) (± 0.85%) 801B/op 108.51× slower\n crystal-i18n/i18n interpolation 65.55k ( 15.26µs) (± 1.01%) 28.2kB/op 664.37× slower\n syeopite/lens interpolation 2.04M (490.17ns) (± 1.35%) 565B/op 21.35× slower\n wout/rosetta interpolation 43.55M ( 22.96ns) (± 4.81%) 80.0B/op fastest\n```\n\nRosetta is that much faster because a lot of the hard work happens at\ncompile-time. And because the majority of the data is stored on the [stack\nrather than the\nheap](https://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap),\nout of the scope of garbage collector.\n\nRead more on [the official docs page](https://wout.github.io/rosetta/latest).\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n```yaml\ndependencies:\n rosetta:\n github: wout/rosetta\n```\n\n2. Run `shards install`\n\n3. Run `bin/rosetta --init`\n\n4. Require the generated config file:\n\n```cr\n# src/app_name.cr\nrequire \"../config/rosetta\"\n```\n\n5. Include the `Rosetta::Translatable` mixin:\n\n```cr\n# src/pages/main_layout.cr\ninclude Rosetta::Translatable\n```\n\n6. Localize your app\n\n```cr\nRosetta.locale = :es\n\nclass Hello::ShowPage < MainLayout\n def content\n h1 r(\"welcome_message\").t(name: \"Brian\") # => \"¡Hola Brian!\"\n end\nend\n```\n\nRead more on [the official docs page](https://wout.github.io/rosetta/latest).\n\n## Development\n\nMake sure you have [Guardian.cr](https://github.com/f/guardian) installed. Then\nrun:\n\n```bash\n$ guardian\n```\n\nThis will automatically:\n\n- run ameba for src and spec files\n- run the relevant spec for any file in src\n- run spec file whenever they are saved\n- install shards whenever you save shard.yml\n\n## Documentation\n\n- [Reference](https://wout.github.io/rosetta/latest)\n- [API Docs](https://wout.github.io/rosetta/api/main)\n\n## Contributing\n\n### To the lib\n\n1. Fork it ()\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n### To the docs\n\nCheck out the `docs` branch and run the following command to launch the docs locally:\n\n```\ndocker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material\n```\n\n## Contributors\n\n- [wout](https://github.com/wout) - creator and maintainer\n\n## Acknowledgements\n\nThis shard pulls inspiration from the following projects:\n\n- [crimson-knight/i18n.cr](https://github.com/crimson-knight/i18n.cr)\n- [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n)\n- [syeopite/lens](https://github.com/syeopite/lens)\n- [Rails](https://github.com/rails/rails)\n","program":{"html_id":"Rosetta/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"locations":[],"repository_name":"Rosetta","program":true,"enum":false,"alias":false,"const":false,"types":[{"html_id":"Rosetta/Rosetta","path":"Rosetta.html","kind":"module","full_name":"Rosetta","name":"Rosetta","abstract":false,"locations":[{"filename":"src/rosetta/aliases.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/aliases.cr#L1"},{"filename":"src/rosetta/annotations.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/annotations.cr#L1"},{"filename":"src/rosetta/backend.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/backend.cr#L1"},{"filename":"src/rosetta/config.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/config.cr#L1"},{"filename":"src/rosetta/configuration.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/configuration.cr#L4"},{"filename":"src/rosetta/interpolation.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/interpolation.cr#L1"},{"filename":"src/rosetta/localizable.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L1"},{"filename":"src/rosetta/localization.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L1"},{"filename":"src/rosetta/lucky/integration.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/lucky/integration.cr#L1"},{"filename":"src/rosetta/parser.cr","line_number":7,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L7"},{"filename":"src/rosetta/parser/builder.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/builder.cr#L1"},{"filename":"src/rosetta/parser/checks.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/checks.cr#L1"},{"filename":"src/rosetta/parser/config.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L1"},{"filename":"src/rosetta/pluralization.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization.cr#L1"},{"filename":"src/rosetta/pluralization/rule.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule.cr#L1"},{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/arabic.cr#L1"},{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/breton.cr#L1"},{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L1"},{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/colognian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/east_slavic.cr#L1"},{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/irish.cr#L1"},{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/langi.cr#L1"},{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/latvian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/lithuanian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/macedonian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/maltese.cr#L1"},{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/manx.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_two_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_with_zero_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/polish.cr#L1"},{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/romanian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/scottish_gaelic.cr#L1"},{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/slovenian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/upper_sorbian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/welsh.cr#L1"},{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/west_slavic.cr#L1"},{"filename":"src/rosetta/translatable.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translatable.cr#L1"},{"filename":"src/rosetta/translation.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L1"},{"filename":"src/rosetta/version.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/version.cr#L1"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"VERSION","name":"VERSION","value":"{{ (`shards version \\\"/home/runner/work/rosetta/rosetta/src/rosetta\\\"`).chomp.stringify }}"}],"class_methods":[{"html_id":"distance_of_time_in_words(from:Time,to:Time):String-class-method","name":"distance_of_time_in_words","doc":"Returns a `String` with approximate distance in time between `from` and\n`to`. For example:\n\n```\nRosetta.distance_of_time_in_words(\n Time.utc(2021, 10, 15, 8, 0, 0),\n Time.utc(2021, 10, 15, 8, 0, 5))\n)\n# => \"5 seconds\"\n```\n\nMost of the code for this method is borrowed from Lucky.","summary":"

Returns a String with approximate distance in time between from and to.

","abstract":false,"args":[{"name":"from","external_name":"from","restriction":"Time"},{"name":"to","external_name":"to","restriction":"Time"}],"args_string":"(from : Time, to : Time) : String","args_html":"(from : Time, to : Time) : String","location":{"filename":"src/rosetta/localization.cr","line_number":77,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L77"},"def":{"name":"distance_of_time_in_words","args":[{"name":"from","external_name":"from","restriction":"Time"},{"name":"to","external_name":"to","restriction":"Time"}],"return_type":"String","visibility":"Public","body":"minutes = (to - from).minutes\nseconds = (to - from).seconds\nhours = (to - from).hours\ndays = (to - from).days\nif days != 0\n return distance_in_days(days)\nend\nif hours != 0\n return distance_in_hours(hours)\nend\nif minutes != 0\n return distance_in_minutes(minutes)\nend\ndistance_in_seconds(seconds)\n"}},{"html_id":"interpolate(translation:String,values:Hash|NamedTuple)-class-method","name":"interpolate","doc":"Interpolates a given string with the values from the given hash or named\ntuple.","summary":"

Interpolates a given string with the values from the given hash or named tuple.

","abstract":false,"args":[{"name":"translation","external_name":"translation","restriction":"String"},{"name":"values","external_name":"values","restriction":"Hash | NamedTuple"}],"args_string":"(translation : String, values : Hash | NamedTuple)","args_html":"(translation : String, values : Hash | NamedTuple)","location":{"filename":"src/rosetta/interpolation.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/interpolation.cr#L4"},"def":{"name":"interpolate","args":[{"name":"translation","external_name":"translation","restriction":"String"},{"name":"values","external_name":"values","restriction":"Hash | NamedTuple"}],"visibility":"Public","body":"values.each do |key, value|\n translation = if value.is_a?(Time)\n localize_time(value, translation)\n else\n if value.is_a?(Tuple(Int32, Int32, Int32))\n localize_time(Time.local(*value), translation)\n else\n translation.gsub(/\\%\\{#{key}\\}/, value)\n end\n end\nend\ntranslation\n"}},{"html_id":"locale:String-class-method","name":"locale","doc":"Gets the current locale at runtime using the config instance stored in the\ncurrent fiber.","summary":"

Gets the current locale at runtime using the config instance stored in the current fiber.

","abstract":false,"location":{"filename":"src/rosetta/configuration.cr","line_number":24,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/configuration.cr#L24"},"def":{"name":"locale","return_type":"String","visibility":"Public","body":"config.locale"}},{"html_id":"locale=(locale:String|Symbol)-class-method","name":"locale=","doc":"Sets the current locale at runtime using the config instance stored in the\ncurrent fiber.","summary":"

Sets the current locale at runtime using the config instance stored in the current fiber.

","abstract":false,"args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"args_string":"(locale : String | Symbol)","args_html":"(locale : String | Symbol)","location":{"filename":"src/rosetta/configuration.cr","line_number":18,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/configuration.cr#L18"},"def":{"name":"locale=","args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"visibility":"Public","body":"config.locale = locale"}},{"html_id":"localize_time(time:Time,format:String)-class-method","name":"localize_time","doc":"Uses a given format to localize a given Time object, for example:\n\n```\nRosetta.localize_time(Time.local, \"%d %b %Y %H:%M:%S\")\n```","summary":"

Uses a given format to localize a given Time object, for example:

","abstract":false,"args":[{"name":"time","external_name":"time","restriction":"Time"},{"name":"format","external_name":"format","restriction":"String"}],"args_string":"(time : Time, format : String)","args_html":"(time : Time, format : String)","location":{"filename":"src/rosetta/localization.cr","line_number":63,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L63"},"def":{"name":"localize_time","args":[{"name":"time","external_name":"time","restriction":"Time"},{"name":"format","external_name":"format","restriction":"String"}],"visibility":"Public","body":"time.to_s(localize_day_and_month_names(time, format))"}},{"html_id":"localize_time(time:Tuple(Int32,Int32,Int32),format:String)-class-method","name":"localize_time","abstract":false,"args":[{"name":"time","external_name":"time","restriction":"Tuple(Int32, Int32, Int32)"},{"name":"format","external_name":"format","restriction":"String"}],"args_string":"(time : Tuple(Int32, Int32, Int32), format : String)","args_html":"(time : Tuple(Int32, Int32, Int32), format : String)","location":{"filename":"src/rosetta/localization.cr","line_number":70,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L70"},"def":{"name":"localize_time","args":[{"name":"time","external_name":"time","restriction":"Tuple(Int32, Int32, Int32)"},{"name":"format","external_name":"format","restriction":"String"}],"visibility":"Public","body":"localize_time(Time.local(*time), format)"}},{"html_id":"pluralize(count:Rosetta::CountArg,translation:NamedTuple,rule:Pluralization::Rule=Pluralization::RULES[Rosetta.locale].new)-class-method","name":"pluralize","doc":"Pluralizes a given pluralizable translation.","summary":"

Pluralizes a given pluralizable translation.

","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"},{"name":"translation","external_name":"translation","restriction":"NamedTuple"},{"name":"rule","default_value":"Pluralization::RULES[Rosetta.locale].new","external_name":"rule","restriction":"Pluralization::Rule"}],"args_string":"(count : Rosetta::CountArg, translation : NamedTuple, rule : Pluralization::Rule = Pluralization::RULES[Rosetta.locale].new)","args_html":"(count : Rosetta::CountArg, translation : NamedTuple, rule : Pluralization::Rule = Pluralization::RULES[Rosetta.locale].new)","location":{"filename":"src/rosetta/pluralization.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization.cr#L3"},"def":{"name":"pluralize","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"},{"name":"translation","external_name":"translation","restriction":"NamedTuple"},{"name":"rule","default_value":"Pluralization::RULES[Rosetta.locale].new","external_name":"rule","restriction":"Pluralization::Rule"}],"visibility":"Public","body":"if (count == 0) && translation[:zero]?\n return translation[:zero]?.to_s\nend\ntranslation[rule.apply(count)]\n"}},{"html_id":"time_ago_in_words(from:Time):String-class-method","name":"time_ago_in_words","doc":"Returns a `String` with approximate distance in time between `from` and\ncurrent moment.\n\n```\ntime_ago_in_words(Time.utc(2019, 8, 30))\n# => \"about a month\"\n# gives the same result as:\ndistance_of_time_in_words(Time.utc(2019, 8, 30), Time.utc)\n# => \"about a month\"\n```\n\nSee more examples in `#distance_of_time_in_words`.","summary":"

Returns a String with approximate distance in time between from and current moment.

","abstract":false,"args":[{"name":"from","external_name":"from","restriction":"Time"}],"args_string":"(from : Time) : String","args_html":"(from : Time) : String","location":{"filename":"src/rosetta/localization.cr","line_number":77,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L77"},"def":{"name":"time_ago_in_words","args":[{"name":"from","external_name":"from","restriction":"Time"}],"return_type":"String","visibility":"Public","body":"distance_of_time_in_words(from, Time.utc)"}},{"html_id":"time_from_now_in_words(to:Time):String-class-method","name":"time_from_now_in_words","doc":"Returns a `String` with approximate distance in time between current\nmoment and future date.\n\n```\ntime_from_now_in_words(Time.utc(2022, 8, 30))\n# => \"about a year\"\n# gives the same result as:\ndistance_of_time_in_words(Time.utc, Time.utc(2022, 8, 30))\n# => \"about a year\"\n```\n\nSee more examples in `#distance_of_time_in_words`.","summary":"

Returns a String with approximate distance in time between current moment and future date.

","abstract":false,"args":[{"name":"to","external_name":"to","restriction":"Time"}],"args_string":"(to : Time) : String","args_html":"(to : Time) : String","location":{"filename":"src/rosetta/localization.cr","line_number":77,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L77"},"def":{"name":"time_from_now_in_words","args":[{"name":"to","external_name":"to","restriction":"Time"}],"return_type":"String","visibility":"Public","body":"distance_of_time_in_words(Time.utc, to)"}},{"html_id":"with_locale(locale:String|Symbol,&)-class-method","name":"with_locale","doc":"Temporarily use a different locale.","summary":"

Temporarily use a different locale.

","abstract":false,"args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"args_string":"(locale : String | Symbol, &)","args_html":"(locale : String | Symbol, &)","location":{"filename":"src/rosetta/translation.cr","line_number":41,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L41"},"def":{"name":"with_locale","args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"yields":0,"block_arity":0,"visibility":"Public","body":"begin\n current_locale = Rosetta.locale\n Rosetta.locale = locale\n yield\nensure\n Rosetta.locale = current_locale || default_locale\nend"}}],"macros":[{"html_id":"available_locales-macro","name":"available_locales","doc":"Fetches the available locales from the corresponding annotation.","summary":"

Fetches the available locales from the corresponding annotation.

","abstract":false,"location":{"filename":"src/rosetta/configuration.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/configuration.cr#L11"},"def":{"name":"available_locales","visibility":"Public","body":" \n{% locales = (@type.annotation(Rosetta::AvailableLocales)).args %}\n\n [\n{{ locales.map() do |__arg0|\n __arg0.id.stringify\nend.splat }}\n]\n \n"}},{"html_id":"date(format=:default)-macro","name":"date","doc":"Localizes a date, for example:\n\n```\nRosetta.date.t(Time.local)\nRosetta.date.t({2021, 8, 20})\nRosetta.date(:long).l(Time.local)\nRosetta.date(\"%a, %d %b %Y\").l(Time.local.date)\n```","summary":"

Localizes a date, for example:

","abstract":false,"args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"args_string":"(format = :default)","args_html":"(format = :default)","location":{"filename":"src/rosetta/localization.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L10"},"def":{"name":"date","args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"visibility":"Public","body":" \n{% if format.is_a?(SymbolLiteral) %}\n format = Rosetta.find(\"rosetta_localization.date.formats.{{ format.id }}\")\n {% else %}\n format = {{ format }}\n {% end %}\n\n\n Rosetta::LocalizedTime.new(format)\n \n"}},{"html_id":"default_locale-macro","name":"default_locale","doc":"Fetches the default locale from the corresponding annotation.","summary":"

Fetches the default locale from the corresponding annotation.

","abstract":false,"location":{"filename":"src/rosetta/configuration.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/configuration.cr#L6"},"def":{"name":"default_locale","visibility":"Public","body":" \n{{ (@type.annotation(Rosetta::DefaultLocale)).args.first.id.stringify }}\n\n \n"}},{"html_id":"find(key)-macro","name":"find","doc":"Finds the translations for the given key as a dedicated class instance for\nthe translation, which inherits from `Rosetta::Translation`.\n\nIf the key does not exist, a compile error will be raised.","summary":"

Finds the translations for the given key as a dedicated class instance for the translation, which inherits from Rosetta::Translation.

","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""}],"args_string":"(key)","args_html":"(key)","location":{"filename":"src/rosetta/translation.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L6"},"def":{"name":"find","args":[{"name":"key","external_name":"key","restriction":""}],"visibility":"Public","body":" \n{% if key.is_a?(StringLiteral) %}\n {% class_name_from_key = (key.split('.')).map(&.camelcase).join('_')\ntranslation_class_name = \"#{class_name_from_key.id}Translation\".id\n %}\n\n {% if Rosetta::Locales.has_constant?(translation_class_name) %}\n Rosetta::Locales::{{ translation_class_name.id }}.new\n {% else %}\n {% raise(\"Missing translation for #{key} in all locales\") %}\n {% end %}\n {% else %}\n {% raise(\"Only a StringLiteral can be used as a locale key.\\n\\n Use case to dynamically switch between locale keys. For example:\\n\\n case value\\n when \\\"one\\\"\\n Rosetta.find(\\\"key.option.one\\\").t\\n when \\\"two\\\"\\n Rosetta.find(\\\"key.option.two\\\").t\\n else\\n Rosetta.find(\\\"key.option.fallback\\\").t\\n end\\n\\n\") %}\n {% end %}\n\n \n"}},{"html_id":"number(format=:default)-macro","name":"number","doc":"Localizes a numeric value, for example:\n\n```\nRosetta.number.t(123_456.789)\nRosetta.number(:custom).l(123_456.789)\n```","summary":"

Localizes a numeric value, for example:

","abstract":false,"args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"args_string":"(format = :default)","args_html":"(format = :default)","location":{"filename":"src/rosetta/localization.cr","line_number":43,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L43"},"def":{"name":"number","args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"visibility":"Public","body":" \n{% namespace = \"Rosetta::Locales::RosettaLocalization_Number_Formats\".id\nprefix = \"#{namespace}_#{format.id.camelcase}\".id\n %}\n\n\n Rosetta::LocalizedNumber.new(\n separator: \n{{ prefix }}\n_SeparatorTranslation.new.to_s,\n delimiter: \n{{ prefix }}\n_DelimiterTranslation.new.to_s,\n decimal_places: \n{{ prefix }}\n_DecimalPlacesTranslation.new.to_s.to_i,\n group: \n{{ prefix }}\n_GroupTranslation.new.to_s.to_i,\n only_significant: \n{{ prefix }}\n_OnlySignificantTranslation.new.to_s == \"true\"\n )\n \n"}},{"html_id":"time(format=:default)-macro","name":"time","doc":"Localizes time, for example:\n\n```\nRosetta.time.t(Time.local)\nRosetta.time(:short).l(Time.local)\nRosetta.time(\"%d %b %Y %H:%M:%S\").l(Time.local)\n```","summary":"

Localizes time, for example:

","abstract":false,"args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"args_string":"(format = :default)","args_html":"(format = :default)","location":{"filename":"src/rosetta/localization.cr","line_number":27,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L27"},"def":{"name":"time","args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"visibility":"Public","body":" \n{% if format.is_a?(SymbolLiteral) %}\n format = Rosetta.find(\"rosetta_localization.time.formats.{{ format.id }}\")\n {% else %}\n format = {{ format }}\n {% end %}\n\n\n Rosetta::LocalizedTime.new(format)\n \n"}}],"types":[{"html_id":"Rosetta/Rosetta/AvailableLocales","path":"Rosetta/AvailableLocales.html","kind":"annotation","full_name":"Rosetta::AvailableLocales","name":"AvailableLocales","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/annotations.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/Backend","path":"Rosetta/Backend.html","kind":"module","full_name":"Rosetta::Backend","name":"Backend","abstract":false,"locations":[{"filename":"src/rosetta/backend.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/backend.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"macros":[{"html_id":"load(path)-macro","name":"load","doc":"Loads the parsed set of locales from the given path. This macro should be\ncalled in an initializer:\n\n```\nRosetta::Backend.load(\"config/locales\")\n```","summary":"

Loads the parsed set of locales from the given path.

","abstract":false,"args":[{"name":"path","external_name":"path","restriction":""}],"args_string":"(path)","args_html":"(path)","location":{"filename":"src/rosetta/backend.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/backend.cr#L9"},"def":{"name":"load","args":[{"name":"path","external_name":"path","restriction":""}],"visibility":"Public","body":" \n{% anno = Rosetta.annotation(Rosetta::DefaultLocale)\nif anno.nil? || (default_locale = anno.args.first).nil?\n raise(\"\\n No default locale is defined. Add an annotation with exactly one value:\\n\\n + @[Rosetta::DefaultLocale(:en)]\\n @[Rosetta::AvailableLocales(:en, :fr, :nl)]\\n module Rosetta\\n end\\n\")\nend\n %}\n\n\n \n{% anno = Rosetta.annotation(Rosetta::AvailableLocales)\nif anno.nil? || (available_locales = anno.args).empty?\n raise(\"\\n No available locales defined. Add an annotation with at least one value:\\n\\n @[Rosetta::DefaultLocale(:en)]\\n + @[Rosetta::AvailableLocales(:en, :fr, :nl)]\\n module Rosetta\\n end\\n\")\nend\n %}\n\n\n \n{% fallback_rules = [] of ::String\nanno = Rosetta.annotation(Rosetta::FallbackRules)\nif anno && (rules = anno.args.first)\n rules.each do |locale, fallback|\n fallback_rules.push(\" #{locale.id}: #{fallback.id}\")\n end\nend\n %}\n\n\n \n{% rules = (Rosetta::Pluralization.annotation(Rosetta::DefaultPluralizationRules)).args.first\nanno = Rosetta.annotation(Rosetta::PluralizationRules)\nif anno && (custom_rules = anno.args.first)\n custom_rules.each do |locale, rule|\n rules[locale] = rule\n end\nend\n %}\n\n\n Rosetta::Pluralization::RULES = \n{{ rules }}\n\n\n \n{% pluralization_rules = [] of String\npluralization_tags = [] of String\navailable_locales.each do |locale|\n rule = rules[locale] || rules[(locale.split(\"-\")).first]\n unless rule\n raise(\"No pluralization rule is defined for \\\"#{locale.id}\\\"\")\n end\n rule = rule.resolve\n anno = rule.annotation(Rosetta::Pluralization::CategoryTags)\n if anno\n pluralization_tags.push(\" #{rule}: [#{(anno.args.join(',')).id}]\")\n else\n raise(\"#{rule} is missing a CategoryTags annotation\")\n end\n pluralization_rules.push(\" #{locale.id}: #{rule}\")\nend\n %}\n\n\n \n{% yaml = \"path: #{path.id}\\ndefault_locale: #{default_locale.id}\\navailable_locales: [#{(available_locales.join(',')).id}]\\nfallback_rules:\\n#{(fallback_rules.join(\"\\n\")).id}\\npluralization_rules:\\n#{(pluralization_rules.join(\"\\n\")).id}\\npluralization_tags:\\n#{(pluralization_tags.uniq.join(\"\\n\")).id}\"\ntranslations = run(\"./runner\", yaml)\nif !(translations.stringify.starts_with?(\"module Rosetta\"))\n raise(translations.stringify)\nend\n %}\n\n\n \n{{ translations }}\n\n \n"}}]},{"html_id":"Rosetta/Rosetta/Config","path":"Rosetta/Config.html","kind":"class","full_name":"Rosetta::Config","name":"Config","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/config.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/config.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"instance_methods":[{"html_id":"locale:String-instance-method","name":"locale","doc":"Gets the current locale or falls back to the default locale if it's not\ndefined.","summary":"

Gets the current locale or falls back to the default locale if it's not defined.

","abstract":false,"location":{"filename":"src/rosetta/config.cr","line_number":18,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/config.cr#L18"},"def":{"name":"locale","return_type":"String","visibility":"Public","body":"(@locale || Rosetta.default_locale)"}},{"html_id":"locale=(locale:String|Symbol)-instance-method","name":"locale=","doc":"Sets the current locale with the given value, if it's found in the\navailable locales.","summary":"

Sets the current locale with the given value, if it's found in the available locales.

","abstract":false,"args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"args_string":"(locale : String | Symbol)","args_html":"(locale : String | Symbol)","location":{"filename":"src/rosetta/config.cr","line_number":7,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/config.cr#L7"},"def":{"name":"locale=","args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"visibility":"Public","body":"@locale = if Rosetta.available_locales.map(&.to_s).includes?(locale.to_s)\n locale.to_s\nelse\n Rosetta.default_locale\nend"}}]},{"html_id":"Rosetta/Rosetta/CountArg","path":"Rosetta/CountArg.html","kind":"alias","full_name":"Rosetta::CountArg","name":"CountArg","abstract":false,"locations":[{"filename":"src/rosetta/aliases.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/aliases.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"(Float64 | Int32 | Int64)","aliased_html":"Float64 | Int32 | Int64","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/DefaultLocale","path":"Rosetta/DefaultLocale.html","kind":"annotation","full_name":"Rosetta::DefaultLocale","name":"DefaultLocale","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/annotations.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/DefaultPluralizationRules","path":"Rosetta/DefaultPluralizationRules.html","kind":"annotation","full_name":"Rosetta::DefaultPluralizationRules","name":"DefaultPluralizationRules","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/annotations.cr#L6"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/FallbackRules","path":"Rosetta/FallbackRules.html","kind":"annotation","full_name":"Rosetta::FallbackRules","name":"FallbackRules","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/annotations.cr#L4"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/Fallbacks","path":"Rosetta/Fallbacks.html","kind":"alias","full_name":"Rosetta::Fallbacks","name":"Fallbacks","abstract":false,"locations":[{"filename":"src/rosetta/aliases.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/aliases.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"(Array(String) | Hash(String, Array(String) | String) | Nil)","aliased_html":"Array(String) | Hash(String, Array(String) | String) | Nil","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/InterpolatedTranslation","path":"Rosetta/InterpolatedTranslation.html","kind":"module","full_name":"Rosetta::InterpolatedTranslation","name":"InterpolatedTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":75,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L75"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations with interpolations.","summary":"

Methods for translations with interpolations.

","instance_methods":[{"html_id":"t_hash(values:Hash)-instance-method","name":"t_hash","doc":"Using a hash for interpolation is considered unsafe since the content of\nhashes can't be checked at compile-time. Try to avoid using this method if\nyou can.","summary":"

Using a hash for interpolation is considered unsafe since the content of hashes can't be checked at compile-time.

","abstract":false,"args":[{"name":"values","external_name":"values","restriction":"Hash"}],"args_string":"(values : Hash)","args_html":"(values : Hash)","location":{"filename":"src/rosetta/translation.cr","line_number":79,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L79"},"def":{"name":"t_hash","args":[{"name":"values","external_name":"values","restriction":"Hash"}],"visibility":"Public","body":"Rosetta.interpolate(raw, values)"}}]},{"html_id":"Rosetta/Rosetta/InterpolationArgumentException","path":"Rosetta/InterpolationArgumentException.html","kind":"class","full_name":"Rosetta::InterpolationArgumentException","name":"InterpolationArgumentException","abstract":false,"superclass":{"html_id":"Rosetta/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"Rosetta/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/interpolation.cr","line_number":21,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/interpolation.cr#L21"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/Localizable","path":"Rosetta/Localizable.html","kind":"module","full_name":"Rosetta::Localizable","name":"Localizable","abstract":false,"locations":[{"filename":"src/rosetta/localizable.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Include this module in any class where you need to localize many values.","summary":"

Include this module in any class where you need to localize many values.

","instance_methods":[{"html_id":"distance_of_time_in_words(*args,**options)-instance-method","name":"distance_of_time_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/localizable.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L4"},"def":{"name":"distance_of_time_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"Rosetta.distance_of_time_in_words(*args, **options)"}},{"html_id":"distance_of_time_in_words(*args,**options,&)-instance-method","name":"distance_of_time_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/localizable.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L4"},"def":{"name":"distance_of_time_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"Rosetta.distance_of_time_in_words(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"time_ago_in_words(*args,**options)-instance-method","name":"time_ago_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/localizable.cr","line_number":5,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L5"},"def":{"name":"time_ago_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"Rosetta.time_ago_in_words(*args, **options)"}},{"html_id":"time_ago_in_words(*args,**options,&)-instance-method","name":"time_ago_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/localizable.cr","line_number":5,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L5"},"def":{"name":"time_ago_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"Rosetta.time_ago_in_words(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"time_from_now_in_words(*args,**options)-instance-method","name":"time_from_now_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/localizable.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L6"},"def":{"name":"time_from_now_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"Rosetta.time_from_now_in_words(*args, **options)"}},{"html_id":"time_from_now_in_words(*args,**options,&)-instance-method","name":"time_from_now_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/localizable.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L6"},"def":{"name":"time_from_now_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"Rosetta.time_from_now_in_words(*args, **options) do |*yield_args|\n yield *yield_args\nend"}}],"macros":[{"html_id":"r_date(format)-macro","name":"r_date","doc":"Finds the translations for a given format to localize a date","summary":"

Finds the translations for a given format to localize a date

","abstract":false,"args":[{"name":"format","external_name":"format","restriction":""}],"args_string":"(format)","args_html":"(format)","location":{"filename":"src/rosetta/localizable.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L9"},"def":{"name":"r_date","args":[{"name":"format","external_name":"format","restriction":""}],"visibility":"Public","body":" Rosetta.date(\n{{ format }}\n)\n \n"}},{"html_id":"r_number(format)-macro","name":"r_number","doc":"Finds the translations for a given format to localize a number","summary":"

Finds the translations for a given format to localize a number

","abstract":false,"args":[{"name":"format","external_name":"format","restriction":""}],"args_string":"(format)","args_html":"(format)","location":{"filename":"src/rosetta/localizable.cr","line_number":19,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L19"},"def":{"name":"r_number","args":[{"name":"format","external_name":"format","restriction":""}],"visibility":"Public","body":" Rosetta.number(\n{{ format }}\n)\n \n"}},{"html_id":"r_time(format)-macro","name":"r_time","doc":"Finds the translations for a given format to localize a time","summary":"

Finds the translations for a given format to localize a time

","abstract":false,"args":[{"name":"format","external_name":"format","restriction":""}],"args_string":"(format)","args_html":"(format)","location":{"filename":"src/rosetta/localizable.cr","line_number":14,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L14"},"def":{"name":"r_time","args":[{"name":"format","external_name":"format","restriction":""}],"visibility":"Public","body":" Rosetta.time(\n{{ format }}\n)\n \n"}}]},{"html_id":"Rosetta/Rosetta/LocalizedNumber","path":"Rosetta/LocalizedNumber.html","kind":"struct","full_name":"Rosetta::LocalizedNumber","name":"LocalizedNumber","abstract":false,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/localization.cr","line_number":288,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L288"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"LocalizedNumber is similar to a Translation object; it implements a similar\ninterface but its sole purpose is to localize numeric objects.","summary":"

LocalizedNumber is similar to a Translation object; it implements a similar interface but its sole purpose is to localize numeric objects.

","constructors":[{"html_id":"new(separator:String|Char,delimiter:String|Char,decimal_places:Int32,group:Int32,only_significant:Bool)-class-method","name":"new","abstract":false,"args":[{"name":"separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","external_name":"group","restriction":"Int32"},{"name":"only_significant","external_name":"only_significant","restriction":"Bool"}],"args_string":"(separator : String | Char, delimiter : String | Char, decimal_places : Int32, group : Int32, only_significant : Bool)","args_html":"(separator : String | Char, delimiter : String | Char, decimal_places : Int32, group : Int32, only_significant : Bool)","location":{"filename":"src/rosetta/localization.cr","line_number":289,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L289"},"def":{"name":"new","args":[{"name":"separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","external_name":"group","restriction":"Int32"},{"name":"only_significant","external_name":"only_significant","restriction":"Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(separator, delimiter, decimal_places, group, only_significant)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"l(number:Number,separator:String|Char=@separator,delimiter:String|Char=@delimiter,decimal_places:Int32=@decimal_places,group:Int32=@group,only_significant:Bool=@only_significant)-instance-method","name":"l","abstract":false,"args":[{"name":"number","external_name":"number","restriction":"Number"},{"name":"separator","default_value":"@separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","default_value":"@delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","default_value":"@decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","default_value":"@group","external_name":"group","restriction":"Int32"},{"name":"only_significant","default_value":"@only_significant","external_name":"only_significant","restriction":"Bool"}],"args_string":"(number : Number, separator : String | Char = @separator, delimiter : String | Char = @delimiter, decimal_places : Int32 = @decimal_places, group : Int32 = @group, only_significant : Bool = @only_significant)","args_html":"(number : Number, separator : String | Char = @separator, delimiter : String | Char = @delimiter, decimal_places : Int32 = @decimal_places, group : Int32 = @group, only_significant : Bool = @only_significant)","location":{"filename":"src/rosetta/localization.cr","line_number":298,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L298"},"def":{"name":"l","args":[{"name":"number","external_name":"number","restriction":"Number"},{"name":"separator","default_value":"@separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","default_value":"@delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","default_value":"@decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","default_value":"@group","external_name":"group","restriction":"Int32"},{"name":"only_significant","default_value":"@only_significant","external_name":"only_significant","restriction":"Bool"}],"visibility":"Public","body":"number.format(separator: separator, delimiter: delimiter, decimal_places: decimal_places, group: group, only_significant: only_significant)"}}]},{"html_id":"Rosetta/Rosetta/LocalizedTime","path":"Rosetta/LocalizedTime.html","kind":"struct","full_name":"Rosetta::LocalizedTime","name":"LocalizedTime","abstract":false,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/localization.cr","line_number":267,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L267"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"LocalizedTime is similar to a Translation object; it implements a similar\ninterface but its sole purpose is to localize time objects.","summary":"

LocalizedTime is similar to a Translation object; it implements a similar interface but its sole purpose is to localize time objects.

","constructors":[{"html_id":"new(format:String)-class-method","name":"new","abstract":false,"args":[{"name":"format","external_name":"format","restriction":"String"}],"args_string":"(format : String)","args_html":"(format : String)","location":{"filename":"src/rosetta/localization.cr","line_number":274,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L274"},"def":{"name":"new","args":[{"name":"format","external_name":"format","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(format)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(translation:Translation)-class-method","name":"new","abstract":false,"args":[{"name":"translation","external_name":"translation","restriction":"Translation"}],"args_string":"(translation : Translation)","args_html":"(translation : Translation)","location":{"filename":"src/rosetta/localization.cr","line_number":270,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L270"},"def":{"name":"new","args":[{"name":"translation","external_name":"translation","restriction":"Translation"}],"visibility":"Public","body":"_ = allocate\n_.initialize(translation)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"format:String-instance-method","name":"format","abstract":false,"location":{"filename":"src/rosetta/localization.cr","line_number":268,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L268"},"def":{"name":"format","visibility":"Public","body":"@format"}},{"html_id":"l(time:Time)-instance-method","name":"l","abstract":false,"args":[{"name":"time","external_name":"time","restriction":"Time"}],"args_string":"(time : Time)","args_html":"(time : Time)","location":{"filename":"src/rosetta/localization.cr","line_number":277,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L277"},"def":{"name":"l","args":[{"name":"time","external_name":"time","restriction":"Time"}],"visibility":"Public","body":"Rosetta.localize_time(time, format)"}},{"html_id":"l(date:Tuple(Int32,Int32,Int32))-instance-method","name":"l","abstract":false,"args":[{"name":"date","external_name":"date","restriction":"Tuple(Int32, Int32, Int32)"}],"args_string":"(date : Tuple(Int32, Int32, Int32))","args_html":"(date : Tuple(Int32, Int32, Int32))","location":{"filename":"src/rosetta/localization.cr","line_number":281,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L281"},"def":{"name":"l","args":[{"name":"date","external_name":"date","restriction":"Tuple(Int32, Int32, Int32)"}],"visibility":"Public","body":"Rosetta.localize_time(Time.local(*date), format)"}}]},{"html_id":"Rosetta/Rosetta/Lucky","path":"Rosetta/Lucky.html","kind":"module","full_name":"Rosetta::Lucky","name":"Lucky","abstract":false,"locations":[{"filename":"src/rosetta/lucky/integration.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/lucky/integration.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"macros":[{"html_id":"integrate-macro","name":"integrate","abstract":false,"location":{"filename":"src/rosetta/lucky/integration.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/lucky/integration.cr#L3"},"def":{"name":"integrate","visibility":"Public","body":" \n{% targets = {\"Avram::Model\", \"Avram::Operation\", \"Avram::SaveOperation(T)\", \"Lucky::Action\", \"Lucky::BaseComponent\"} %}\n\n\n \n{% for target in targets %}\n abstract class ::{{ target.id }}\n include Rosetta::Localizable\n include Rosetta::Translatable\n end\n {% end %}\n\n\n module ::Lucky::HTMLPage\n macro included\n include Rosetta::Localizable\n include Rosetta::Translatable\n \nend\n \nend\n\n module ::Lucky::AllowedInTags\n \nend\n\n module Rosetta::SimpleTranslation\n macro included\n include ::Lucky::AllowedInTags\n \nend\n \nend\n\n abstract struct ::Avram::I18nBackend; \nend\n\n struct Rosetta::AvramBackend < ::Avram::I18nBackend\n def get(key : String | Symbol) : String\n \n{% if true %}\n case key\n {% for val in [\"exact_size_of\", \"max_size_of\", \"min_size_of\", \"numeric_max\", \"numeric_min\"] of ::String %}\n when :validate_{{ val.id }}\n Rosetta.find(\"avram.validate_{{ val.id }}\").t(size: \"%d\")\n {% end %}\n {% for val in [\"acceptance_of\", \"at_most_one_filled\", \"confirmation_of\", \"exactly_one_filled\", \"format_of\", \"inclusion_of\", \"numeric_nil\", \"required\", \"uniqueness_of\"] of ::String %}\n when :validate_{{ val.id }}\n Rosetta.find(\"avram.validate_{{ val.id }}\").t\n {% end %}\n else\n raise \"Avram translation missing for '#{key}'\"\n end\n {% end %}\n\n \nend\n \nend\n \n"}}]},{"html_id":"Rosetta/Rosetta/Parser","path":"Rosetta/Parser.html","kind":"class","full_name":"Rosetta::Parser","name":"Parser","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/Rosetta/Parser/Checks","kind":"module","full_name":"Rosetta::Parser::Checks","name":"Checks"},{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/parser.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L11"},{"filename":"src/rosetta/parser/builder.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/builder.cr#L2"},{"filename":"src/rosetta/parser/checks.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/checks.cr#L2"},{"filename":"src/rosetta/parser/config.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"Rosetta/Rosetta/Parser/Checks","kind":"module","full_name":"Rosetta::Parser::Checks","name":"Checks"}],"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"constructors":[{"html_id":"new(config:Config)-class-method","name":"new","abstract":false,"args":[{"name":"config","external_name":"config","restriction":"Config"}],"args_string":"(config : Config)","args_html":"(config : Config)","location":{"filename":"src/rosetta/parser.cr","line_number":28,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L28"},"def":{"name":"new","args":[{"name":"config","external_name":"config","restriction":"Config"}],"visibility":"Public","body":"_ = allocate\n_.initialize(config)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"alternative_locales:Array(String)-instance-method","name":"alternative_locales","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":19,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L19"},"def":{"name":"alternative_locales","return_type":"Array(String)","visibility":"Public","body":"@alternative_locales"}},{"html_id":"available_locales(*args,**options)-instance-method","name":"available_locales","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":14,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L14"},"def":{"name":"available_locales","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.available_locales(*args, **options)"}},{"html_id":"available_locales(*args,**options,&)-instance-method","name":"available_locales","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":14,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L14"},"def":{"name":"available_locales","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.available_locales(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"config:Config-instance-method","name":"config","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":20,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L20"},"def":{"name":"config","return_type":"Config","visibility":"Public","body":"@config"}},{"html_id":"default_locale(*args,**options)-instance-method","name":"default_locale","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":15,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L15"},"def":{"name":"default_locale","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.default_locale(*args, **options)"}},{"html_id":"default_locale(*args,**options,&)-instance-method","name":"default_locale","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":15,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L15"},"def":{"name":"default_locale","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.default_locale(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"error:String|Nil-instance-method","name":"error","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":21,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L21"},"def":{"name":"error","return_type":"String | ::Nil","visibility":"Public","body":"@error"}},{"html_id":"fallback_rules(*args,**options)-instance-method","name":"fallback_rules","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":16,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L16"},"def":{"name":"fallback_rules","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.fallback_rules(*args, **options)"}},{"html_id":"fallback_rules(*args,**options,&)-instance-method","name":"fallback_rules","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":16,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L16"},"def":{"name":"fallback_rules","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.fallback_rules(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"parse!:String-instance-method","name":"parse!","doc":"Returns a list of self-containing translation modules.","summary":"

Returns a list of self-containing translation modules.

","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":39,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L39"},"def":{"name":"parse!","return_type":"String","visibility":"Public","body":"builder = Builder.new(default_locale)\nif translations.empty?\n return builder.build_locales(translations)\nend\nif valid_key_set?\nelse\n return error.to_s\nend\nbuilder.build_locales(processed_translations)\n"}},{"html_id":"path(*args,**options)-instance-method","name":"path","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":17,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L17"},"def":{"name":"path","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.path(*args, **options)"}},{"html_id":"path(*args,**options,&)-instance-method","name":"path","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":17,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L17"},"def":{"name":"path","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.path(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"pluralization_tags:Hash(String,Array(String))-instance-method","name":"pluralization_tags","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":22,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L22"},"def":{"name":"pluralization_tags","return_type":"Hash(String, Array(String))","visibility":"Public","body":"@pluralization_tags"}},{"html_id":"ruling_key_set:Array(String)-instance-method","name":"ruling_key_set","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":23,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L23"},"def":{"name":"ruling_key_set","return_type":"Array(String)","visibility":"Public","body":"@ruling_key_set"}},{"html_id":"translations:TranslationsHash-instance-method","name":"translations","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":24,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L24"},"def":{"name":"translations","return_type":"TranslationsHash","visibility":"Public","body":"@translations"}}],"types":[{"html_id":"Rosetta/Rosetta/Parser/Builder","path":"Rosetta/Parser/Builder.html","kind":"class","full_name":"Rosetta::Parser::Builder","name":"Builder","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/parser/builder.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/builder.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"},"constructors":[{"html_id":"new(default_locale:String)-class-method","name":"new","abstract":false,"args":[{"name":"default_locale","external_name":"default_locale","restriction":"String"}],"args_string":"(default_locale : String)","args_html":"(default_locale : String)","location":{"filename":"src/rosetta/parser/builder.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/builder.cr#L6"},"def":{"name":"new","args":[{"name":"default_locale","external_name":"default_locale","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(default_locale)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"build_locales(translations:TranslationsHash)-instance-method","name":"build_locales","doc":"Builds the wrapping module for all translation structs.","summary":"

Builds the wrapping module for all translation structs.

","abstract":false,"args":[{"name":"translations","external_name":"translations","restriction":"TranslationsHash"}],"args_string":"(translations : TranslationsHash)","args_html":"(translations : TranslationsHash)","location":{"filename":"src/rosetta/parser/builder.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/builder.cr#L10"},"def":{"name":"build_locales","args":[{"name":"translations","external_name":"translations","restriction":"TranslationsHash"}],"visibility":"Public","body":"\"module Rosetta\\n module Locales\\n#{(build_structs(translations)).join(\"\\n\")}\\n end\\nend\""}},{"html_id":"default_locale:String-instance-method","name":"default_locale","abstract":false,"location":{"filename":"src/rosetta/parser/builder.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/builder.cr#L4"},"def":{"name":"default_locale","visibility":"Public","body":"@default_locale"}}]},{"html_id":"Rosetta/Rosetta/Parser/Checks","path":"Rosetta/Parser/Checks.html","kind":"module","full_name":"Rosetta::Parser::Checks","name":"Checks","abstract":false,"locations":[{"filename":"src/rosetta/parser/checks.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/checks.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"}],"namespace":{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"}},{"html_id":"Rosetta/Rosetta/Parser/Config","path":"Rosetta/Parser/Config.html","kind":"class","full_name":"Rosetta::Parser::Config","name":"Config","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/YAML/Serializable","kind":"module","full_name":"YAML::Serializable","name":"Serializable"},{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/parser/config.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"Rosetta/YAML/Serializable","kind":"module","full_name":"YAML::Serializable","name":"Serializable"}],"namespace":{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"},"constructors":[{"html_id":"new(ctx:YAML::ParseContext,node:YAML::Nodes::Node)-class-method","name":"new","abstract":false,"args":[{"name":"ctx","external_name":"ctx","restriction":"YAML::ParseContext"},{"name":"node","external_name":"node","restriction":"YAML::Nodes::Node"}],"args_string":"(ctx : YAML::ParseContext, node : YAML::Nodes::Node)","args_html":"(ctx : YAML::ParseContext, node : YAML::Nodes::Node)","location":{"filename":"src/rosetta/parser/config.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L4"},"def":{"name":"new","args":[{"name":"ctx","external_name":"ctx","restriction":"YAML::ParseContext"},{"name":"node","external_name":"node","restriction":"YAML::Nodes::Node"}],"visibility":"Public","body":"new_from_yaml_node(ctx, node)"}}],"instance_methods":[{"html_id":"available_locales:Array(String)-instance-method","name":"available_locales","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L8"},"def":{"name":"available_locales","return_type":"Array(String)","visibility":"Public","body":"@available_locales"}},{"html_id":"default_locale:String-instance-method","name":"default_locale","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":7,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L7"},"def":{"name":"default_locale","return_type":"String","visibility":"Public","body":"@default_locale"}},{"html_id":"fallback_rules:Hash(String,String)|Nil-instance-method","name":"fallback_rules","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L9"},"def":{"name":"fallback_rules","return_type":"Hash(String, String) | ::Nil","visibility":"Public","body":"@fallback_rules"}},{"html_id":"path:String-instance-method","name":"path","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L6"},"def":{"name":"path","return_type":"String","visibility":"Public","body":"@path"}},{"html_id":"pluralization_rules:Hash(String,String)-instance-method","name":"pluralization_rules","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L10"},"def":{"name":"pluralization_rules","return_type":"Hash(String, String)","visibility":"Public","body":"@pluralization_rules"}},{"html_id":"pluralization_tags:Hash(String,Array(String))-instance-method","name":"pluralization_tags","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L11"},"def":{"name":"pluralization_tags","return_type":"Hash(String, Array(String))","visibility":"Public","body":"@pluralization_tags"}}]}]},{"html_id":"Rosetta/Rosetta/Pluralization","path":"Rosetta/Pluralization.html","kind":"module","full_name":"Rosetta::Pluralization","name":"Pluralization","abstract":false,"locations":[{"filename":"src/rosetta/pluralization.cr","line_number":161,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization.cr#L161"},{"filename":"src/rosetta/pluralization/rule.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule.cr#L2"},{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/arabic.cr#L2"},{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/breton.cr#L2"},{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L2"},{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/colognian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/east_slavic.cr#L2"},{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/irish.cr#L2"},{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/langi.cr#L2"},{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/latvian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/lithuanian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/macedonian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/maltese.cr#L2"},{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/manx.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_two_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_with_zero_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/polish.cr#L2"},{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/romanian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/scottish_gaelic.cr#L2"},{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/slovenian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/upper_sorbian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/welsh.cr#L2"},{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/west_slavic.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"types":[{"html_id":"Rosetta/Rosetta/Pluralization/CategoryTags","path":"Rosetta/Pluralization/CategoryTags.html","kind":"annotation","full_name":"Rosetta::Pluralization::CategoryTags","name":"CategoryTags","abstract":false,"locations":[{"filename":"src/rosetta/pluralization/rule.cr","line_number":16,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule.cr#L16"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization","kind":"module","full_name":"Rosetta::Pluralization","name":"Pluralization"},"doc":"Define required category tags using this annotation.","summary":"

Define required category tags using this annotation.

"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule","path":"Rosetta/Pluralization/Rule.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule","abstract":true,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule.cr#L11"},{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/arabic.cr#L3"},{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/breton.cr#L3"},{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L3"},{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/colognian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/east_slavic.cr#L3"},{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/irish.cr#L3"},{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/langi.cr#L3"},{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/latvian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/lithuanian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/macedonian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/maltese.cr#L3"},{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/manx.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_two_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_with_zero_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/polish.cr#L3"},{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/romanian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/scottish_gaelic.cr#L3"},{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/slovenian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/upper_sorbian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/welsh.cr#L3"},{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/west_slavic.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Arabic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Arabic","name":"Arabic"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Breton","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Breton","name":"Breton"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/CentralMoroccoTamazight","kind":"struct","full_name":"Rosetta::Pluralization::Rule::CentralMoroccoTamazight","name":"CentralMoroccoTamazight"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Colognian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Colognian","name":"Colognian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/EastSlavic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::EastSlavic","name":"EastSlavic"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Irish","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Irish","name":"Irish"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Langi","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Langi","name":"Langi"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Latvian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Latvian","name":"Latvian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Lithuanian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Lithuanian","name":"Lithuanian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Macedonian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Macedonian","name":"Macedonian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Maltese","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Maltese","name":"Maltese"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Manx","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Manx","name":"Manx"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneOther","name":"OneOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneTwoOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneTwoOther","name":"OneTwoOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneUpToTwoOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneUpToTwoOther","name":"OneUpToTwoOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneWithZeroOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneWithZeroOther","name":"OneWithZeroOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Other","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Other","name":"Other"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Polish","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Polish","name":"Polish"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Romanian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Romanian","name":"Romanian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/ScottishGaelic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::ScottishGaelic","name":"ScottishGaelic"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Slovenian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Slovenian","name":"Slovenian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/UpperSorbian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::UpperSorbian","name":"UpperSorbian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Welsh","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Welsh","name":"Welsh"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/WestSlavic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::WestSlavic","name":"WestSlavic"}],"namespace":{"html_id":"Rosetta/Rosetta/Pluralization","kind":"module","full_name":"Rosetta::Pluralization","name":"Pluralization"},"doc":"Abstract pluralization rule.\n\nA pluralization rule struct provides a main `#rule` method that, given a\n`count` number, returns the corresponding plural category tag, which\nshould be part of the common plural category tags defined\n[by the CLDR](http://cldr.unicode.org/index/cldr-spec/plural-rules):\n\n`:zero`, `:one`, `:two`, `:few`, `:many` and `:other`.","summary":"

Abstract pluralization rule.

","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/rosetta/pluralization/rule.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule.cr#L11"},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":true,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule.cr","line_number":12,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule.cr#L12"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":""}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/rosetta/pluralization/rule.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule.cr#L11"},"def":{"name":"initialize","visibility":"Public","body":""}}],"types":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Arabic","path":"Rosetta/Pluralization/Rule/Arabic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Arabic","name":"Arabic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/arabic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Arabic pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Arabic pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/arabic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif count == 0\n :zero\nelse\n if count == 1\n :one\n else\n if count == 2\n :two\n else\n if FROM_3_TO_10.includes?(mod100)\n :few\n else\n if FROM_11_TO_99.includes?(mod100)\n :many\n else\n :other\n end\n end\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Breton","path":"Rosetta/Pluralization/Rule/Breton.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Breton","name":"Breton","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/breton.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Breton pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Breton pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/breton.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif (mod10 == 1) && (!([11, 71, 91].includes?(mod100)))\n :one\nelse\n if (mod10 == 2) && (!([12, 72, 92].includes?(mod100)))\n :two\n else\n if ([3, 4, 9].includes?(mod10)) && (!((((10..19).to_a + (70..79).to_a) + (90..99).to_a).includes?(mod100)))\n :few\n else\n if ((count % 1000000) == 0) && (count != 0)\n :many\n else\n :other\n end\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/CentralMoroccoTamazight","path":"Rosetta/Pluralization/Rule/CentralMoroccoTamazight.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::CentralMoroccoTamazight","name":"CentralMoroccoTamazight","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Central Morocco Tamazight pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Central Morocco Tamazight pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ([0, 1] + (11..99).to_a).includes?(count)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Colognian","path":"Rosetta/Pluralization/Rule/Colognian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Colognian","name":"Colognian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/colognian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Colognian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Colognian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/colognian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 0\n :zero\nelse\n if count == 1\n :one\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/EastSlavic","path":"Rosetta/Pluralization/Rule/EastSlavic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::EastSlavic","name":"EastSlavic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/east_slavic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Belarusian, Bosnian, Croatian, Russian, Serbian, Serbo-Croatian, Ukrainian.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Belarusian, Bosnian, Croatian, Russian, Serbian, Serbo-Croatian, Ukrainian.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/east_slavic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif (mod10 == 1) && (mod100 != 11)\n :one\nelse\n if (FROM_2_TO_4.includes?(mod10)) && (!(FROM_12_TO_14.includes?(mod100)))\n :few\n else\n if ((mod10 == 0) || (FROM_5_TO_9.includes?(mod10))) || (FROM_11_TO_14.includes?(mod100))\n :many\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Irish","path":"Rosetta/Pluralization/Rule/Irish.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Irish","name":"Irish","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/irish.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Irish pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Irish pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/irish.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if count == 2\n :two\n else\n if FROM_3_TO_6.includes?(count)\n :few\n else\n if FROM_7_TO_10.includes?(count)\n :many\n else\n :other\n end\n end\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Langi","path":"Rosetta/Pluralization/Rule/Langi.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Langi","name":"Langi","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/langi.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Langi pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Langi pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/langi.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 0\n :zero\nelse\n if count > 0 && count < 2\n :one\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Latvian","path":"Rosetta/Pluralization/Rule/Latvian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Latvian","name":"Latvian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/latvian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Latvian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Latvian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/latvian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ((count % 10) == 1) && ((count % 100) != 11)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Lithuanian","path":"Rosetta/Pluralization/Rule/Lithuanian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Lithuanian","name":"Lithuanian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/lithuanian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Lithuanian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Lithuanian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/lithuanian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif (mod10 == 1) && (!(FROM_11_TO_19.includes?(mod100)))\n :one\nelse\n if (FROM_2_TO_9.includes?(mod10)) && (!(FROM_11_TO_19.includes?(mod100)))\n :few\n else\n :other\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Macedonian","path":"Rosetta/Pluralization/Rule/Macedonian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Macedonian","name":"Macedonian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/macedonian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Macedonian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Macedonian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/macedonian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ((count % 10) == 1) && (count != 11)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Maltese","path":"Rosetta/Pluralization/Rule/Maltese.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Maltese","name":"Maltese","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/maltese.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Maltese pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Maltese pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/maltese.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif count == 1\n :one\nelse\n if (count == 0) || (FROM_2_TO_10.includes?(mod100))\n :few\n else\n if FROM_11_TO_19.includes?(mod100)\n :many\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Manx","path":"Rosetta/Pluralization/Rule/Manx.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Manx","name":"Manx","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/manx.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Manx pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Manx pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/manx.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ([1, 2].includes?(count % 10)) || ((count % 20) == 0)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneOther","path":"Rosetta/Pluralization/Rule/OneOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneOther","name":"OneOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_other.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"The default pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

The default pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_other.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"count == 1 ? :one : :other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneTwoOther","path":"Rosetta/Pluralization/Rule/OneTwoOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneTwoOther","name":"OneTwoOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_two_other.cr#L9"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Cornish, Inari Sami, Inuktitut, Lule Sami, Nama, Northern Sami, Sami Language,\nSkolt Sami, Southern Sami.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Cornish, Inari Sami, Inuktitut, Lule Sami, Nama, Northern Sami, Sami Language, Skolt Sami, Southern Sami.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_two_other.cr#L10"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if count == 2\n :two\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneUpToTwoOther","path":"Rosetta/Pluralization/Rule/OneUpToTwoOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneUpToTwoOther","name":"OneUpToTwoOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: French, Fulah, Kabyle.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: French, Fulah, Kabyle.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"count >= 0 && count < 2 ? :one : :other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneWithZeroOther","path":"Rosetta/Pluralization/Rule/OneWithZeroOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneWithZeroOther","name":"OneWithZeroOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_with_zero_other.cr#L9"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Akan, Amharic, Bihari, Filipino, guw, Hindi, Lingala, Malagasy, Northen Sotho,\nTachelhit, Tagalog, Tigrinya, Walloon.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Akan, Amharic, Bihari, Filipino, guw, Hindi, Lingala, Malagasy, Northen Sotho, Tachelhit, Tagalog, Tigrinya, Walloon.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_with_zero_other.cr#L10"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"(count == 0) || (count == 1) ? :one : :other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Other","path":"Rosetta/Pluralization/Rule/Other.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Other","name":"Other","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/other.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"A rule that only returns the \"other\" pluralization category.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

A rule that only returns the "other" pluralization category.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/other.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":":other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Polish","path":"Rosetta/Pluralization/Rule/Polish.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Polish","name":"Polish","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/polish.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Polish pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Polish pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/polish.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif count == 1\n :one\nelse\n if ([2, 3, 4].includes?(mod10)) && (!([12, 13, 14].includes?(mod100)))\n :few\n else\n if (([0, 1] + (5..9).to_a).includes?(mod10)) || ([12, 13, 14].includes?(mod100))\n :many\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Romanian","path":"Rosetta/Pluralization/Rule/Romanian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Romanian","name":"Romanian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/romanian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Romanian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Romanian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/romanian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if (count == 0) || ((1..19).to_a.includes?(count % 100))\n :few\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/ScottishGaelic","path":"Rosetta/Pluralization/Rule/ScottishGaelic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::ScottishGaelic","name":"ScottishGaelic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/scottish_gaelic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Scottish gaelic pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Scottish gaelic pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/scottish_gaelic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if (count == 1) || (count == 11)\n :one\nelse\n if (count == 2) || (count == 12)\n :two\n else\n if (FROM_3_TO_10 + FROM_13_TO_19).includes?(count)\n :few\n else\n :other\n end\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Slovenian","path":"Rosetta/Pluralization/Rule/Slovenian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Slovenian","name":"Slovenian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/slovenian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Slovenian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Slovenian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/slovenian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif mod100 == 1\n :one\nelse\n if mod100 == 2\n :two\n else\n if (mod100 == 3) || (mod100 == 4)\n :few\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/UpperSorbian","path":"Rosetta/Pluralization/Rule/UpperSorbian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::UpperSorbian","name":"UpperSorbian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/upper_sorbian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Upper sorbian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Upper sorbian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/upper_sorbian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif mod100 == 1\n :one\nelse\n if mod100 == 2\n :two\n else\n if (mod100 == 3) || (mod100 == 4)\n :few\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Welsh","path":"Rosetta/Pluralization/Rule/Welsh.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Welsh","name":"Welsh","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/welsh.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Welsh pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Welsh pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/welsh.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"case count\nwhen 0\n :zero\nwhen 1\n :one\nwhen 2\n :two\nwhen 3\n :few\nwhen 6\n :many\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/WestSlavic","path":"Rosetta/Pluralization/Rule/WestSlavic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::WestSlavic","name":"WestSlavic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/west_slavic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Czech, Slovak.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Czech, Slovak.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/west_slavic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if FROM_2_TO_4.includes?(count)\n :few\n else\n :other\n end\nend"}}]}]}]},{"html_id":"Rosetta/Rosetta/PluralizationRules","path":"Rosetta/PluralizationRules.html","kind":"annotation","full_name":"Rosetta::PluralizationRules","name":"PluralizationRules","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":5,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/annotations.cr#L5"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/PluralizedTranslation","path":"Rosetta/PluralizedTranslation.html","kind":"module","full_name":"Rosetta::PluralizedTranslation","name":"PluralizedTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":85,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L85"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations with pluralizable values.","summary":"

Methods for translations with pluralizable values.

","instance_methods":[{"html_id":"t_hash(values:Hash)-instance-method","name":"t_hash","doc":"Using a hash for interpolation is considered unsafe since the content of\nhashes can't be checked at compile-time. Try to avoid using this method if\nyou can.","summary":"

Using a hash for interpolation is considered unsafe since the content of hashes can't be checked at compile-time.

","abstract":false,"args":[{"name":"values","external_name":"values","restriction":"Hash"}],"args_string":"(values : Hash)","args_html":"(values : Hash)","location":{"filename":"src/rosetta/translation.cr","line_number":89,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L89"},"def":{"name":"t_hash","args":[{"name":"values","external_name":"values","restriction":"Hash"}],"visibility":"Public","body":"if count = values[\"count\"]?\nelse\n message = \"Missing \\\"count\\\" from interpolation values\"\n raise(InterpolationArgumentException.new(message))\nend\nRosetta.interpolate(Rosetta.pluralize(count.to_s.to_i, raw), values)\n"}}]},{"html_id":"Rosetta/Rosetta/SimpleTranslation","path":"Rosetta/SimpleTranslation.html","kind":"module","full_name":"Rosetta::SimpleTranslation","name":"SimpleTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":60,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L60"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations without interpolations.","summary":"

Methods for translations without interpolations.

","instance_methods":[{"html_id":"t-instance-method","name":"t","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":61,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L61"},"def":{"name":"t","visibility":"Public","body":"raw"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/rosetta/translation.cr","line_number":69,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L69"},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io.puts(raw)"}},{"html_id":"to_s-instance-method","name":"to_s","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":65,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L65"},"def":{"name":"to_s","visibility":"Public","body":"raw"}}]},{"html_id":"Rosetta/Rosetta/Translatable","path":"Rosetta/Translatable.html","kind":"module","full_name":"Rosetta::Translatable","name":"Translatable","abstract":false,"locations":[{"filename":"src/rosetta/translatable.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translatable.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Include this module in any class where you need to translate many keys.","summary":"

Include this module in any class where you need to translate many keys.

","macros":[{"html_id":"r(key)-macro","name":"r","doc":"Finds the translation for the given key. If the given key starts with a\n\".\", a prefix based on the current class name will be used. Unless a\n`Rosetta::Translatable::Config` annotation is defined with a value for\n`prefix`, which will then be used instead.\n\n@[Rosetta::Translatable::Config(prefix: \"user\")]\nclass Person\n include Rosetta::Translatable\n\n def greeting\n r(\".welcome_message\").t # => key resolves to \"user.welcome_message\"\n end\nend","summary":"

Finds the translation for the given key.

","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""}],"args_string":"(key)","args_html":"(key)","location":{"filename":"src/rosetta/translatable.cr","line_number":17,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translatable.cr#L17"},"def":{"name":"r","args":[{"name":"key","external_name":"key","restriction":""}],"visibility":"Public","body":" \n{% if key.is_a?(StringLiteral) %}\n {% if key.starts_with?('.')\n config = @type.annotation(Rosetta::Translatable::Config)\n if config && config[:prefix]\n key = \"#{config[:prefix].id}#{key.id}\"\n else\n inferred_key = (@type.id.underscore.gsub(/::|\\(/, \".\")).gsub(/\\)/, \"\")\n key = \"#{inferred_key.id}#{key.id}\"\n end\nend %}\n\n Rosetta.find({{ key }})\n {% else %}\n {% raise(\"Only a StringLiteral can be used as a locale key.\\n\\n Use case to dynamically switch between locale keys. For example:\\n\\n case value\\n when \\\"one\\\"\\n r(\\\"key.option.one\\\").t\\n when \\\"two\\\"\\n r(\\\"key.option.two\\\").t\\n else\\n r(\\\"key.option.fallback\\\").t\\n end\\n\\n\") %}\n {% end %}\n\n \n"}}],"types":[{"html_id":"Rosetta/Rosetta/Translatable/Config","path":"Rosetta/Translatable/Config.html","kind":"annotation","full_name":"Rosetta::Translatable::Config","name":"Config","abstract":false,"locations":[{"filename":"src/rosetta/translatable.cr","line_number":56,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translatable.cr#L56"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Translatable","kind":"module","full_name":"Rosetta::Translatable","name":"Translatable"}}]},{"html_id":"Rosetta/Rosetta/Translation","path":"Rosetta/Translation.html","kind":"struct","full_name":"Rosetta::Translation","name":"Translation","abstract":true,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/translation.cr","line_number":50,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L50"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Base struct for translation values.","summary":"

Base struct for translation values.

","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":50,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L50"},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":50,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L50"},"def":{"name":"initialize","visibility":"Public","body":""}},{"html_id":"raw-instance-method","name":"raw","doc":"Return the raw translation value for the current locale.","summary":"

Return the raw translation value for the current locale.

","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":54,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L54"},"def":{"name":"raw","visibility":"Public","body":"translations[Rosetta.locale]"}},{"html_id":"translations-instance-method","name":"translations","abstract":true,"location":{"filename":"src/rosetta/translation.cr","line_number":51,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L51"},"def":{"name":"translations","visibility":"Public","body":""}}]},{"html_id":"Rosetta/Rosetta/Translations","path":"Rosetta/Translations.html","kind":"alias","full_name":"Rosetta::Translations","name":"Translations","abstract":false,"locations":[{"filename":"src/rosetta/parser.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Hash(String, String) | String)","aliased_html":"Hash(String, Hash(String, String) | String)","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/TranslationsHash","path":"Rosetta/TranslationsHash.html","kind":"alias","full_name":"Rosetta::TranslationsHash","name":"TranslationsHash","abstract":false,"locations":[{"filename":"src/rosetta/parser.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L9"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Hash(String, Hash(String, String) | String))","aliased_html":"Hash(String, Hash(String, Hash(String, String) | String))","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/VariantsTranslation","path":"Rosetta/VariantsTranslation.html","kind":"module","full_name":"Rosetta::VariantsTranslation","name":"VariantsTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":100,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L100"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations with variants.","summary":"

Methods for translations with variants.

","instance_methods":[{"html_id":"t_hash(values:Hash)-instance-method","name":"t_hash","doc":"Using a hash for interpolation is considered unsafe since the content of\nhashes can't be checked at compile-time. Try to avoid using this method if\nyou can.","summary":"

Using a hash for interpolation is considered unsafe since the content of hashes can't be checked at compile-time.

","abstract":false,"args":[{"name":"values","external_name":"values","restriction":"Hash"}],"args_string":"(values : Hash)","args_html":"(values : Hash)","location":{"filename":"src/rosetta/translation.cr","line_number":104,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L104"},"def":{"name":"t_hash","args":[{"name":"values","external_name":"values","restriction":"Hash"}],"visibility":"Public","body":"if variant = values[\"variant\"]?\nelse\n message = \"Missing \\\"variant\\\" from interpolation values\"\n raise(InterpolationArgumentException.new(message))\nend\nRosetta.interpolate(raw[variant], values)\n"}}]}]}]}} \ No newline at end of file +{"repository_name":"Rosetta","body":"# Rosetta\n\n

\n \"Rosetta\n

\n\nA blazing fast internationalization (i18n) library for Crystal with compile-time\nkey lookup. You'll never have a `missing translation` in your app, ever again.\n\n![GitHub](https://img.shields.io/github/license/wout/rosetta)\n![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/wout/rosetta)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/wout/rosetta/ci.yml?branch=main)\n\n## Why use Rosetta?\n\n### You'll never have a missing translation\n\nRosetta is different from other internationalization libraries because it\nhandles key lookup at compile-time rather than runtime. The significant\nadvantage is that you'll be able to find missing translations - or typos in\nyour locale keys - during development rather than after you've deployed your\napp. This is also true for translation keys in all additional locales.\n\n### You'll never have a missing interpolation\n\nIn Rosetta, interpolation keys are arguments to the translation method. So if\nyou're missing an argument, the compiler will complain. The parser will also\ncompare interpolation keys in additional locales to the ones found in the\ndefault locale, and complain if some are missing.\n\n### Rosetta is more than 12x faster than similar libraries\n\nBenchmarking against other libraries which also use YAML or JSON backends,\nRosetta is 12x to 700x faster than any other one.\n\nFor simple translations:\n\n```\ncrimson-knight/i18n.cr translation 303.57k ( 3.29µs) (± 4.62%) 801B/op 702.21× slower\n crystal-i18n/i18n translation 18.07M ( 55.35ns) (± 7.28%) 48.0B/op 12.39× slower\n syeopite/lens translation 5.09M (196.47ns) (± 4.60%) 176B/op 43.98× slower\n wout/rosetta translation 223.86M ( 4.47ns) (± 2.20%) 0.0B/op fastest\n```\n\nFor translations with interpolations:\n\n```\ncrimson-knight/i18n.cr interpolation 318.12k ( 3.14µs) (± 0.85%) 801B/op 108.51× slower\n crystal-i18n/i18n interpolation 65.55k ( 15.26µs) (± 1.01%) 28.2kB/op 664.37× slower\n syeopite/lens interpolation 2.04M (490.17ns) (± 1.35%) 565B/op 21.35× slower\n wout/rosetta interpolation 43.55M ( 22.96ns) (± 4.81%) 80.0B/op fastest\n```\n\nRosetta is that much faster because a lot of the hard work happens at\ncompile-time. And because the majority of the data is stored on the [stack\nrather than the\nheap](https://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap),\nout of the scope of garbage collector.\n\nRead more on [the official docs page](https://wout.github.io/rosetta/latest).\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n```yaml\ndependencies:\n rosetta:\n github: wout/rosetta\n```\n\n2. Run `shards install`\n\n3. Run `bin/rosetta --init`\n\n4. Require the generated config file:\n\n```cr\n# src/app_name.cr\nrequire \"../config/rosetta\"\n```\n\n5. Include the `Rosetta::Translatable` mixin:\n\n```cr\n# src/pages/main_layout.cr\ninclude Rosetta::Translatable\n```\n\n6. Localize your app\n\n```cr\nRosetta.locale = :es\n\nclass Hello::ShowPage < MainLayout\n def content\n h1 r(\"welcome_message\").t(name: \"Brian\") # => \"¡Hola Brian!\"\n end\nend\n```\n\nRead more on [the official docs page](https://wout.github.io/rosetta/latest).\n\n## Development\n\nMake sure you have [Guardian.cr](https://github.com/f/guardian) installed. Then\nrun:\n\n```bash\n$ guardian\n```\n\nThis will automatically:\n\n- run ameba for src and spec files\n- run the relevant spec for any file in src\n- run spec file whenever they are saved\n- install shards whenever you save shard.yml\n\n## Documentation\n\n- [Reference](https://wout.github.io/rosetta/latest)\n- [API Docs](https://wout.github.io/rosetta/api/main)\n\n## Contributing\n\n### To the lib\n\n1. Fork it ()\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n### To the docs\n\nCheck out the `docs` branch and run the following command to launch the docs locally:\n\n```\ndocker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material\n```\n\n## Contributors\n\n- [wout](https://github.com/wout) - creator and maintainer\n\n## Acknowledgements\n\nThis shard pulls inspiration from the following projects:\n\n- [crimson-knight/i18n.cr](https://github.com/crimson-knight/i18n.cr)\n- [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n)\n- [syeopite/lens](https://github.com/syeopite/lens)\n- [Rails](https://github.com/rails/rails)\n","program":{"html_id":"Rosetta/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"locations":[],"repository_name":"Rosetta","program":true,"enum":false,"alias":false,"const":false,"types":[{"html_id":"Rosetta/Rosetta","path":"Rosetta.html","kind":"module","full_name":"Rosetta","name":"Rosetta","abstract":false,"locations":[{"filename":"src/rosetta/aliases.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/aliases.cr#L1"},{"filename":"src/rosetta/annotations.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/annotations.cr#L1"},{"filename":"src/rosetta/backend.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/backend.cr#L1"},{"filename":"src/rosetta/config.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/config.cr#L1"},{"filename":"src/rosetta/configuration.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/configuration.cr#L4"},{"filename":"src/rosetta/interpolation.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/interpolation.cr#L1"},{"filename":"src/rosetta/localizable.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L1"},{"filename":"src/rosetta/localization.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L1"},{"filename":"src/rosetta/lucky/integration.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/lucky/integration.cr#L1"},{"filename":"src/rosetta/parser.cr","line_number":7,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L7"},{"filename":"src/rosetta/parser/builder.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/builder.cr#L1"},{"filename":"src/rosetta/parser/checks.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/checks.cr#L1"},{"filename":"src/rosetta/parser/config.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L1"},{"filename":"src/rosetta/pluralization.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization.cr#L1"},{"filename":"src/rosetta/pluralization/rule.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule.cr#L1"},{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/arabic.cr#L1"},{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/breton.cr#L1"},{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L1"},{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/colognian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/east_slavic.cr#L1"},{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/irish.cr#L1"},{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/langi.cr#L1"},{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/latvian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/lithuanian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/macedonian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/maltese.cr#L1"},{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/manx.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_two_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_with_zero_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/polish.cr#L1"},{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/romanian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/scottish_gaelic.cr#L1"},{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/slovenian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/upper_sorbian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/welsh.cr#L1"},{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/west_slavic.cr#L1"},{"filename":"src/rosetta/translatable.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translatable.cr#L1"},{"filename":"src/rosetta/translation.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L1"},{"filename":"src/rosetta/version.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/version.cr#L1"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"VERSION","name":"VERSION","value":"{{ (`shards version \\\"/home/runner/work/rosetta/rosetta/src/rosetta\\\"`).chomp.stringify }}"}],"class_methods":[{"html_id":"distance_of_time_in_words(from:Time,to:Time):String-class-method","name":"distance_of_time_in_words","doc":"Returns a `String` with approximate distance in time between `from` and\n`to`. For example:\n\n```\nRosetta.distance_of_time_in_words(\n Time.utc(2021, 10, 15, 8, 0, 0),\n Time.utc(2021, 10, 15, 8, 0, 5))\n)\n# => \"5 seconds\"\n```\n\nMost of the code for this method is borrowed from Lucky.","summary":"

Returns a String with approximate distance in time between from and to.

","abstract":false,"args":[{"name":"from","external_name":"from","restriction":"Time"},{"name":"to","external_name":"to","restriction":"Time"}],"args_string":"(from : Time, to : Time) : String","args_html":"(from : Time, to : Time) : String","location":{"filename":"src/rosetta/localization.cr","line_number":77,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L77"},"def":{"name":"distance_of_time_in_words","args":[{"name":"from","external_name":"from","restriction":"Time"},{"name":"to","external_name":"to","restriction":"Time"}],"return_type":"String","visibility":"Public","body":"minutes = (to - from).minutes\nseconds = (to - from).seconds\nhours = (to - from).hours\ndays = (to - from).days\nif days != 0\n return distance_in_days(days)\nend\nif hours != 0\n return distance_in_hours(hours)\nend\nif minutes != 0\n return distance_in_minutes(minutes)\nend\ndistance_in_seconds(seconds)\n"}},{"html_id":"interpolate(translation:String,values:Hash|NamedTuple)-class-method","name":"interpolate","doc":"Interpolates a given string with the values from the given hash or named\ntuple.","summary":"

Interpolates a given string with the values from the given hash or named tuple.

","abstract":false,"args":[{"name":"translation","external_name":"translation","restriction":"String"},{"name":"values","external_name":"values","restriction":"Hash | NamedTuple"}],"args_string":"(translation : String, values : Hash | NamedTuple)","args_html":"(translation : String, values : Hash | NamedTuple)","location":{"filename":"src/rosetta/interpolation.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/interpolation.cr#L4"},"def":{"name":"interpolate","args":[{"name":"translation","external_name":"translation","restriction":"String"},{"name":"values","external_name":"values","restriction":"Hash | NamedTuple"}],"visibility":"Public","body":"values.each do |key, value|\n translation = if value.is_a?(Time)\n localize_time(value, translation)\n else\n if value.is_a?(Tuple(Int32, Int32, Int32))\n localize_time(Time.local(*value), translation)\n else\n translation.gsub(/\\%\\{#{key}\\}/, value)\n end\n end\nend\ntranslation\n"}},{"html_id":"locale:String-class-method","name":"locale","doc":"Gets the current locale at runtime using the config instance stored in the\ncurrent fiber.","summary":"

Gets the current locale at runtime using the config instance stored in the current fiber.

","abstract":false,"location":{"filename":"src/rosetta/configuration.cr","line_number":24,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/configuration.cr#L24"},"def":{"name":"locale","return_type":"String","visibility":"Public","body":"config.locale"}},{"html_id":"locale=(locale:String|Symbol)-class-method","name":"locale=","doc":"Sets the current locale at runtime using the config instance stored in the\ncurrent fiber.","summary":"

Sets the current locale at runtime using the config instance stored in the current fiber.

","abstract":false,"args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"args_string":"(locale : String | Symbol)","args_html":"(locale : String | Symbol)","location":{"filename":"src/rosetta/configuration.cr","line_number":18,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/configuration.cr#L18"},"def":{"name":"locale=","args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"visibility":"Public","body":"config.locale = locale"}},{"html_id":"localize_time(time:Time,format:String)-class-method","name":"localize_time","doc":"Uses a given format to localize a given Time object, for example:\n\n```\nRosetta.localize_time(Time.local, \"%d %b %Y %H:%M:%S\")\n```","summary":"

Uses a given format to localize a given Time object, for example:

","abstract":false,"args":[{"name":"time","external_name":"time","restriction":"Time"},{"name":"format","external_name":"format","restriction":"String"}],"args_string":"(time : Time, format : String)","args_html":"(time : Time, format : String)","location":{"filename":"src/rosetta/localization.cr","line_number":63,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L63"},"def":{"name":"localize_time","args":[{"name":"time","external_name":"time","restriction":"Time"},{"name":"format","external_name":"format","restriction":"String"}],"visibility":"Public","body":"time.to_s(localize_day_and_month_names(time, format))"}},{"html_id":"localize_time(time:Tuple(Int32,Int32,Int32),format:String)-class-method","name":"localize_time","abstract":false,"args":[{"name":"time","external_name":"time","restriction":"Tuple(Int32, Int32, Int32)"},{"name":"format","external_name":"format","restriction":"String"}],"args_string":"(time : Tuple(Int32, Int32, Int32), format : String)","args_html":"(time : Tuple(Int32, Int32, Int32), format : String)","location":{"filename":"src/rosetta/localization.cr","line_number":70,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L70"},"def":{"name":"localize_time","args":[{"name":"time","external_name":"time","restriction":"Tuple(Int32, Int32, Int32)"},{"name":"format","external_name":"format","restriction":"String"}],"visibility":"Public","body":"localize_time(Time.local(*time), format)"}},{"html_id":"pluralize(count:Rosetta::CountArg,translation:NamedTuple,rule:Pluralization::Rule=Pluralization::RULES[Rosetta.locale].new)-class-method","name":"pluralize","doc":"Pluralizes a given pluralizable translation.","summary":"

Pluralizes a given pluralizable translation.

","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"},{"name":"translation","external_name":"translation","restriction":"NamedTuple"},{"name":"rule","default_value":"Pluralization::RULES[Rosetta.locale].new","external_name":"rule","restriction":"Pluralization::Rule"}],"args_string":"(count : Rosetta::CountArg, translation : NamedTuple, rule : Pluralization::Rule = Pluralization::RULES[Rosetta.locale].new)","args_html":"(count : Rosetta::CountArg, translation : NamedTuple, rule : Pluralization::Rule = Pluralization::RULES[Rosetta.locale].new)","location":{"filename":"src/rosetta/pluralization.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization.cr#L3"},"def":{"name":"pluralize","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"},{"name":"translation","external_name":"translation","restriction":"NamedTuple"},{"name":"rule","default_value":"Pluralization::RULES[Rosetta.locale].new","external_name":"rule","restriction":"Pluralization::Rule"}],"visibility":"Public","body":"if (count == 0) && translation[:zero]?\n return translation[:zero]?.to_s\nend\ntranslation[rule.apply(count)]\n"}},{"html_id":"time_ago_in_words(from:Time):String-class-method","name":"time_ago_in_words","doc":"Returns a `String` with approximate distance in time between `from` and\ncurrent moment.\n\n```\ntime_ago_in_words(Time.utc(2019, 8, 30))\n# => \"about a month\"\n# gives the same result as:\ndistance_of_time_in_words(Time.utc(2019, 8, 30), Time.utc)\n# => \"about a month\"\n```\n\nSee more examples in `#distance_of_time_in_words`.","summary":"

Returns a String with approximate distance in time between from and current moment.

","abstract":false,"args":[{"name":"from","external_name":"from","restriction":"Time"}],"args_string":"(from : Time) : String","args_html":"(from : Time) : String","location":{"filename":"src/rosetta/localization.cr","line_number":77,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L77"},"def":{"name":"time_ago_in_words","args":[{"name":"from","external_name":"from","restriction":"Time"}],"return_type":"String","visibility":"Public","body":"distance_of_time_in_words(from, Time.utc)"}},{"html_id":"time_from_now_in_words(to:Time):String-class-method","name":"time_from_now_in_words","doc":"Returns a `String` with approximate distance in time between current\nmoment and future date.\n\n```\ntime_from_now_in_words(Time.utc(2022, 8, 30))\n# => \"about a year\"\n# gives the same result as:\ndistance_of_time_in_words(Time.utc, Time.utc(2022, 8, 30))\n# => \"about a year\"\n```\n\nSee more examples in `#distance_of_time_in_words`.","summary":"

Returns a String with approximate distance in time between current moment and future date.

","abstract":false,"args":[{"name":"to","external_name":"to","restriction":"Time"}],"args_string":"(to : Time) : String","args_html":"(to : Time) : String","location":{"filename":"src/rosetta/localization.cr","line_number":77,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L77"},"def":{"name":"time_from_now_in_words","args":[{"name":"to","external_name":"to","restriction":"Time"}],"return_type":"String","visibility":"Public","body":"distance_of_time_in_words(Time.utc, to)"}},{"html_id":"with_locale(locale:String|Symbol,&)-class-method","name":"with_locale","doc":"Temporarily use a different locale.","summary":"

Temporarily use a different locale.

","abstract":false,"args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"args_string":"(locale : String | Symbol, &)","args_html":"(locale : String | Symbol, &)","location":{"filename":"src/rosetta/translation.cr","line_number":41,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L41"},"def":{"name":"with_locale","args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"yields":0,"block_arity":0,"visibility":"Public","body":"begin\n current_locale = Rosetta.locale\n Rosetta.locale = locale\n yield\nensure\n Rosetta.locale = current_locale || default_locale\nend"}}],"macros":[{"html_id":"available_locales-macro","name":"available_locales","doc":"Fetches the available locales from the corresponding annotation.","summary":"

Fetches the available locales from the corresponding annotation.

","abstract":false,"location":{"filename":"src/rosetta/configuration.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/configuration.cr#L11"},"def":{"name":"available_locales","visibility":"Public","body":" \n{% locales = (@type.annotation(Rosetta::AvailableLocales)).args %}\n\n [\n{{ locales.map() do |__arg0|\n __arg0.id.stringify\nend.splat }}\n]\n \n"}},{"html_id":"date(format=:default)-macro","name":"date","doc":"Localizes a date, for example:\n\n```\nRosetta.date.t(Time.local)\nRosetta.date.t({2021, 8, 20})\nRosetta.date(:long).l(Time.local)\nRosetta.date(\"%a, %d %b %Y\").l(Time.local.date)\n```","summary":"

Localizes a date, for example:

","abstract":false,"args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"args_string":"(format = :default)","args_html":"(format = :default)","location":{"filename":"src/rosetta/localization.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L10"},"def":{"name":"date","args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"visibility":"Public","body":" \n{% if format.is_a?(SymbolLiteral) %}\n format = Rosetta.find(\"rosetta_localization.date.formats.{{ format.id }}\")\n {% else %}\n format = {{ format }}\n {% end %}\n\n\n Rosetta::LocalizedTime.new(format)\n \n"}},{"html_id":"default_locale-macro","name":"default_locale","doc":"Fetches the default locale from the corresponding annotation.","summary":"

Fetches the default locale from the corresponding annotation.

","abstract":false,"location":{"filename":"src/rosetta/configuration.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/configuration.cr#L6"},"def":{"name":"default_locale","visibility":"Public","body":" \n{{ (@type.annotation(Rosetta::DefaultLocale)).args.first.id.stringify }}\n\n \n"}},{"html_id":"find(key)-macro","name":"find","doc":"Finds the translations for the given key as a dedicated class instance for\nthe translation, which inherits from `Rosetta::Translation`.\n\nIf the key does not exist, a compile error will be raised.","summary":"

Finds the translations for the given key as a dedicated class instance for the translation, which inherits from Rosetta::Translation.

","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""}],"args_string":"(key)","args_html":"(key)","location":{"filename":"src/rosetta/translation.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L6"},"def":{"name":"find","args":[{"name":"key","external_name":"key","restriction":""}],"visibility":"Public","body":" \n{% if key.is_a?(StringLiteral) %}\n {% class_name_from_key = (key.split('.')).map(&.camelcase).join('_')\ntranslation_class_name = \"#{class_name_from_key.id}Translation\".id\n %}\n\n {% if Rosetta::Locales.has_constant?(translation_class_name) %}\n Rosetta::Locales::{{ translation_class_name.id }}.new\n {% else %}\n {% raise(\"Missing translation for #{key} in all locales\") %}\n {% end %}\n {% else %}\n {% raise(\"Only a StringLiteral can be used as a locale key.\\n\\n Use case to dynamically switch between locale keys. For example:\\n\\n case value\\n when \\\"one\\\"\\n Rosetta.find(\\\"key.option.one\\\").t\\n when \\\"two\\\"\\n Rosetta.find(\\\"key.option.two\\\").t\\n else\\n Rosetta.find(\\\"key.option.fallback\\\").t\\n end\\n\\n\") %}\n {% end %}\n\n \n"}},{"html_id":"number(format=:default)-macro","name":"number","doc":"Localizes a numeric value, for example:\n\n```\nRosetta.number.t(123_456.789)\nRosetta.number(:custom).l(123_456.789)\n```","summary":"

Localizes a numeric value, for example:

","abstract":false,"args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"args_string":"(format = :default)","args_html":"(format = :default)","location":{"filename":"src/rosetta/localization.cr","line_number":43,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L43"},"def":{"name":"number","args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"visibility":"Public","body":" \n{% namespace = \"Rosetta::Locales::RosettaLocalization_Number_Formats\".id\nprefix = \"#{namespace}_#{format.id.camelcase}\".id\n %}\n\n\n Rosetta::LocalizedNumber.new(\n separator: \n{{ prefix }}\n_SeparatorTranslation.new.to_s,\n delimiter: \n{{ prefix }}\n_DelimiterTranslation.new.to_s,\n decimal_places: \n{{ prefix }}\n_DecimalPlacesTranslation.new.to_s.to_i,\n group: \n{{ prefix }}\n_GroupTranslation.new.to_s.to_i,\n only_significant: \n{{ prefix }}\n_OnlySignificantTranslation.new.to_s == \"true\"\n )\n \n"}},{"html_id":"time(format=:default)-macro","name":"time","doc":"Localizes time, for example:\n\n```\nRosetta.time.t(Time.local)\nRosetta.time(:short).l(Time.local)\nRosetta.time(\"%d %b %Y %H:%M:%S\").l(Time.local)\n```","summary":"

Localizes time, for example:

","abstract":false,"args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"args_string":"(format = :default)","args_html":"(format = :default)","location":{"filename":"src/rosetta/localization.cr","line_number":27,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L27"},"def":{"name":"time","args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"visibility":"Public","body":" \n{% if format.is_a?(SymbolLiteral) %}\n format = Rosetta.find(\"rosetta_localization.time.formats.{{ format.id }}\")\n {% else %}\n format = {{ format }}\n {% end %}\n\n\n Rosetta::LocalizedTime.new(format)\n \n"}}],"types":[{"html_id":"Rosetta/Rosetta/AvailableLocales","path":"Rosetta/AvailableLocales.html","kind":"annotation","full_name":"Rosetta::AvailableLocales","name":"AvailableLocales","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/annotations.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/Backend","path":"Rosetta/Backend.html","kind":"module","full_name":"Rosetta::Backend","name":"Backend","abstract":false,"locations":[{"filename":"src/rosetta/backend.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/backend.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"macros":[{"html_id":"load(path)-macro","name":"load","doc":"Loads the parsed set of locales from the given path. This macro should be\ncalled in an initializer:\n\n```\nRosetta::Backend.load(\"config/locales\")\n```","summary":"

Loads the parsed set of locales from the given path.

","abstract":false,"args":[{"name":"path","external_name":"path","restriction":""}],"args_string":"(path)","args_html":"(path)","location":{"filename":"src/rosetta/backend.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/backend.cr#L9"},"def":{"name":"load","args":[{"name":"path","external_name":"path","restriction":""}],"visibility":"Public","body":" \n{% anno = Rosetta.annotation(Rosetta::DefaultLocale)\nif anno.nil? || (default_locale = anno.args.first).nil?\n raise(\"\\n No default locale is defined. Add an annotation with exactly one value:\\n\\n + @[Rosetta::DefaultLocale(:en)]\\n @[Rosetta::AvailableLocales(:en, :fr, :nl)]\\n module Rosetta\\n end\\n\")\nend\n %}\n\n\n \n{% anno = Rosetta.annotation(Rosetta::AvailableLocales)\nif anno.nil? || (available_locales = anno.args).empty?\n raise(\"\\n No available locales defined. Add an annotation with at least one value:\\n\\n @[Rosetta::DefaultLocale(:en)]\\n + @[Rosetta::AvailableLocales(:en, :fr, :nl)]\\n module Rosetta\\n end\\n\")\nend\n %}\n\n\n \n{% fallback_rules = [] of ::String\nanno = Rosetta.annotation(Rosetta::FallbackRules)\nif anno && (rules = anno.args.first)\n rules.each do |locale, fallback|\n fallback_rules.push(\" #{locale.id}: #{fallback.id}\")\n end\nend\n %}\n\n\n \n{% rules = (Rosetta::Pluralization.annotation(Rosetta::DefaultPluralizationRules)).args.first\nanno = Rosetta.annotation(Rosetta::PluralizationRules)\nif anno && (custom_rules = anno.args.first)\n custom_rules.each do |locale, rule|\n rules[locale] = rule\n end\nend\n %}\n\n\n Rosetta::Pluralization::RULES = \n{{ rules }}\n\n\n \n{% pluralization_rules = [] of String\npluralization_tags = [] of String\navailable_locales.each do |locale|\n rule = rules[locale] || rules[(locale.split(\"-\")).first]\n unless rule\n raise(\"No pluralization rule is defined for \\\"#{locale.id}\\\"\")\n end\n rule = rule.resolve\n anno = rule.annotation(Rosetta::Pluralization::CategoryTags)\n if anno\n pluralization_tags.push(\" #{rule}: [#{(anno.args.join(',')).id}]\")\n else\n raise(\"#{rule} is missing a CategoryTags annotation\")\n end\n pluralization_rules.push(\" #{locale.id}: #{rule}\")\nend\n %}\n\n\n \n{% yaml = \"path: #{path.id}\\ndefault_locale: #{default_locale.id}\\navailable_locales: [#{(available_locales.join(',')).id}]\\nfallback_rules:\\n#{(fallback_rules.join(\"\\n\")).id}\\npluralization_rules:\\n#{(pluralization_rules.join(\"\\n\")).id}\\npluralization_tags:\\n#{(pluralization_tags.uniq.join(\"\\n\")).id}\"\ntranslations = run(\"./runner\", yaml)\nif !(translations.stringify.starts_with?(\"module Rosetta\"))\n raise(translations.stringify)\nend\n %}\n\n\n \n{{ translations }}\n\n \n"}}]},{"html_id":"Rosetta/Rosetta/Config","path":"Rosetta/Config.html","kind":"class","full_name":"Rosetta::Config","name":"Config","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/config.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/config.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"instance_methods":[{"html_id":"locale:String-instance-method","name":"locale","doc":"Gets the current locale or falls back to the default locale if it's not\ndefined.","summary":"

Gets the current locale or falls back to the default locale if it's not defined.

","abstract":false,"location":{"filename":"src/rosetta/config.cr","line_number":18,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/config.cr#L18"},"def":{"name":"locale","return_type":"String","visibility":"Public","body":"(@locale || Rosetta.default_locale)"}},{"html_id":"locale=(locale:String|Symbol)-instance-method","name":"locale=","doc":"Sets the current locale with the given value, if it's found in the\navailable locales.","summary":"

Sets the current locale with the given value, if it's found in the available locales.

","abstract":false,"args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"args_string":"(locale : String | Symbol)","args_html":"(locale : String | Symbol)","location":{"filename":"src/rosetta/config.cr","line_number":7,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/config.cr#L7"},"def":{"name":"locale=","args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"visibility":"Public","body":"@locale = if Rosetta.available_locales.map(&.to_s).includes?(locale.to_s)\n locale.to_s\nelse\n Rosetta.default_locale\nend"}}]},{"html_id":"Rosetta/Rosetta/CountArg","path":"Rosetta/CountArg.html","kind":"alias","full_name":"Rosetta::CountArg","name":"CountArg","abstract":false,"locations":[{"filename":"src/rosetta/aliases.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/aliases.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"(Float64 | Int32 | Int64)","aliased_html":"Float64 | Int32 | Int64","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/DefaultLocale","path":"Rosetta/DefaultLocale.html","kind":"annotation","full_name":"Rosetta::DefaultLocale","name":"DefaultLocale","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/annotations.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/DefaultPluralizationRules","path":"Rosetta/DefaultPluralizationRules.html","kind":"annotation","full_name":"Rosetta::DefaultPluralizationRules","name":"DefaultPluralizationRules","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/annotations.cr#L6"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/FallbackRules","path":"Rosetta/FallbackRules.html","kind":"annotation","full_name":"Rosetta::FallbackRules","name":"FallbackRules","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/annotations.cr#L4"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/Fallbacks","path":"Rosetta/Fallbacks.html","kind":"alias","full_name":"Rosetta::Fallbacks","name":"Fallbacks","abstract":false,"locations":[{"filename":"src/rosetta/aliases.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/aliases.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"(Array(String) | Hash(String, Array(String) | String) | Nil)","aliased_html":"Array(String) | Hash(String, Array(String) | String) | Nil","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/InterpolatedTranslation","path":"Rosetta/InterpolatedTranslation.html","kind":"module","full_name":"Rosetta::InterpolatedTranslation","name":"InterpolatedTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":75,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L75"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations with interpolations.","summary":"

Methods for translations with interpolations.

","instance_methods":[{"html_id":"t_hash(values:Hash)-instance-method","name":"t_hash","doc":"Using a hash for interpolation is considered unsafe since the content of\nhashes can't be checked at compile-time. Try to avoid using this method if\nyou can.","summary":"

Using a hash for interpolation is considered unsafe since the content of hashes can't be checked at compile-time.

","abstract":false,"args":[{"name":"values","external_name":"values","restriction":"Hash"}],"args_string":"(values : Hash)","args_html":"(values : Hash)","location":{"filename":"src/rosetta/translation.cr","line_number":79,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L79"},"def":{"name":"t_hash","args":[{"name":"values","external_name":"values","restriction":"Hash"}],"visibility":"Public","body":"Rosetta.interpolate(raw, values)"}}]},{"html_id":"Rosetta/Rosetta/InterpolationArgumentException","path":"Rosetta/InterpolationArgumentException.html","kind":"class","full_name":"Rosetta::InterpolationArgumentException","name":"InterpolationArgumentException","abstract":false,"superclass":{"html_id":"Rosetta/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"Rosetta/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/interpolation.cr","line_number":21,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/interpolation.cr#L21"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/Localizable","path":"Rosetta/Localizable.html","kind":"module","full_name":"Rosetta::Localizable","name":"Localizable","abstract":false,"locations":[{"filename":"src/rosetta/localizable.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Include this module in any class where you need to localize many values.","summary":"

Include this module in any class where you need to localize many values.

","instance_methods":[{"html_id":"distance_of_time_in_words(*args,**options)-instance-method","name":"distance_of_time_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/localizable.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L4"},"def":{"name":"distance_of_time_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"Rosetta.distance_of_time_in_words(*args, **options)"}},{"html_id":"distance_of_time_in_words(*args,**options,&)-instance-method","name":"distance_of_time_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/localizable.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L4"},"def":{"name":"distance_of_time_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"Rosetta.distance_of_time_in_words(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"time_ago_in_words(*args,**options)-instance-method","name":"time_ago_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/localizable.cr","line_number":5,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L5"},"def":{"name":"time_ago_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"Rosetta.time_ago_in_words(*args, **options)"}},{"html_id":"time_ago_in_words(*args,**options,&)-instance-method","name":"time_ago_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/localizable.cr","line_number":5,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L5"},"def":{"name":"time_ago_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"Rosetta.time_ago_in_words(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"time_from_now_in_words(*args,**options)-instance-method","name":"time_from_now_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/localizable.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L6"},"def":{"name":"time_from_now_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"Rosetta.time_from_now_in_words(*args, **options)"}},{"html_id":"time_from_now_in_words(*args,**options,&)-instance-method","name":"time_from_now_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/localizable.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L6"},"def":{"name":"time_from_now_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"Rosetta.time_from_now_in_words(*args, **options) do |*yield_args|\n yield *yield_args\nend"}}],"macros":[{"html_id":"r_date(format)-macro","name":"r_date","doc":"Finds the translations for a given format to localize a date","summary":"

Finds the translations for a given format to localize a date

","abstract":false,"args":[{"name":"format","external_name":"format","restriction":""}],"args_string":"(format)","args_html":"(format)","location":{"filename":"src/rosetta/localizable.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L9"},"def":{"name":"r_date","args":[{"name":"format","external_name":"format","restriction":""}],"visibility":"Public","body":" Rosetta.date(\n{{ format }}\n)\n \n"}},{"html_id":"r_number(format)-macro","name":"r_number","doc":"Finds the translations for a given format to localize a number","summary":"

Finds the translations for a given format to localize a number

","abstract":false,"args":[{"name":"format","external_name":"format","restriction":""}],"args_string":"(format)","args_html":"(format)","location":{"filename":"src/rosetta/localizable.cr","line_number":19,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L19"},"def":{"name":"r_number","args":[{"name":"format","external_name":"format","restriction":""}],"visibility":"Public","body":" Rosetta.number(\n{{ format }}\n)\n \n"}},{"html_id":"r_time(format)-macro","name":"r_time","doc":"Finds the translations for a given format to localize a time","summary":"

Finds the translations for a given format to localize a time

","abstract":false,"args":[{"name":"format","external_name":"format","restriction":""}],"args_string":"(format)","args_html":"(format)","location":{"filename":"src/rosetta/localizable.cr","line_number":14,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L14"},"def":{"name":"r_time","args":[{"name":"format","external_name":"format","restriction":""}],"visibility":"Public","body":" Rosetta.time(\n{{ format }}\n)\n \n"}}]},{"html_id":"Rosetta/Rosetta/LocalizedNumber","path":"Rosetta/LocalizedNumber.html","kind":"struct","full_name":"Rosetta::LocalizedNumber","name":"LocalizedNumber","abstract":false,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/localization.cr","line_number":288,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L288"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"LocalizedNumber is similar to a Translation object; it implements a similar\ninterface but its sole purpose is to localize numeric objects.","summary":"

LocalizedNumber is similar to a Translation object; it implements a similar interface but its sole purpose is to localize numeric objects.

","constructors":[{"html_id":"new(separator:String|Char,delimiter:String|Char,decimal_places:Int32,group:Int32,only_significant:Bool)-class-method","name":"new","abstract":false,"args":[{"name":"separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","external_name":"group","restriction":"Int32"},{"name":"only_significant","external_name":"only_significant","restriction":"Bool"}],"args_string":"(separator : String | Char, delimiter : String | Char, decimal_places : Int32, group : Int32, only_significant : Bool)","args_html":"(separator : String | Char, delimiter : String | Char, decimal_places : Int32, group : Int32, only_significant : Bool)","location":{"filename":"src/rosetta/localization.cr","line_number":289,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L289"},"def":{"name":"new","args":[{"name":"separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","external_name":"group","restriction":"Int32"},{"name":"only_significant","external_name":"only_significant","restriction":"Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(separator, delimiter, decimal_places, group, only_significant)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"l(number:Number,separator:String|Char=@separator,delimiter:String|Char=@delimiter,decimal_places:Int32=@decimal_places,group:Int32=@group,only_significant:Bool=@only_significant)-instance-method","name":"l","abstract":false,"args":[{"name":"number","external_name":"number","restriction":"Number"},{"name":"separator","default_value":"@separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","default_value":"@delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","default_value":"@decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","default_value":"@group","external_name":"group","restriction":"Int32"},{"name":"only_significant","default_value":"@only_significant","external_name":"only_significant","restriction":"Bool"}],"args_string":"(number : Number, separator : String | Char = @separator, delimiter : String | Char = @delimiter, decimal_places : Int32 = @decimal_places, group : Int32 = @group, only_significant : Bool = @only_significant)","args_html":"(number : Number, separator : String | Char = @separator, delimiter : String | Char = @delimiter, decimal_places : Int32 = @decimal_places, group : Int32 = @group, only_significant : Bool = @only_significant)","location":{"filename":"src/rosetta/localization.cr","line_number":298,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L298"},"def":{"name":"l","args":[{"name":"number","external_name":"number","restriction":"Number"},{"name":"separator","default_value":"@separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","default_value":"@delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","default_value":"@decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","default_value":"@group","external_name":"group","restriction":"Int32"},{"name":"only_significant","default_value":"@only_significant","external_name":"only_significant","restriction":"Bool"}],"visibility":"Public","body":"number.format(separator: separator, delimiter: delimiter, decimal_places: decimal_places, group: group, only_significant: only_significant)"}}]},{"html_id":"Rosetta/Rosetta/LocalizedTime","path":"Rosetta/LocalizedTime.html","kind":"struct","full_name":"Rosetta::LocalizedTime","name":"LocalizedTime","abstract":false,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/localization.cr","line_number":267,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L267"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"LocalizedTime is similar to a Translation object; it implements a similar\ninterface but its sole purpose is to localize time objects.","summary":"

LocalizedTime is similar to a Translation object; it implements a similar interface but its sole purpose is to localize time objects.

","constructors":[{"html_id":"new(format:String)-class-method","name":"new","abstract":false,"args":[{"name":"format","external_name":"format","restriction":"String"}],"args_string":"(format : String)","args_html":"(format : String)","location":{"filename":"src/rosetta/localization.cr","line_number":274,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L274"},"def":{"name":"new","args":[{"name":"format","external_name":"format","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(format)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(translation:Translation)-class-method","name":"new","abstract":false,"args":[{"name":"translation","external_name":"translation","restriction":"Translation"}],"args_string":"(translation : Translation)","args_html":"(translation : Translation)","location":{"filename":"src/rosetta/localization.cr","line_number":270,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L270"},"def":{"name":"new","args":[{"name":"translation","external_name":"translation","restriction":"Translation"}],"visibility":"Public","body":"_ = allocate\n_.initialize(translation)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"format:String-instance-method","name":"format","abstract":false,"location":{"filename":"src/rosetta/localization.cr","line_number":268,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L268"},"def":{"name":"format","visibility":"Public","body":"@format"}},{"html_id":"l(time:Time)-instance-method","name":"l","abstract":false,"args":[{"name":"time","external_name":"time","restriction":"Time"}],"args_string":"(time : Time)","args_html":"(time : Time)","location":{"filename":"src/rosetta/localization.cr","line_number":277,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L277"},"def":{"name":"l","args":[{"name":"time","external_name":"time","restriction":"Time"}],"visibility":"Public","body":"Rosetta.localize_time(time, format)"}},{"html_id":"l(date:Tuple(Int32,Int32,Int32))-instance-method","name":"l","abstract":false,"args":[{"name":"date","external_name":"date","restriction":"Tuple(Int32, Int32, Int32)"}],"args_string":"(date : Tuple(Int32, Int32, Int32))","args_html":"(date : Tuple(Int32, Int32, Int32))","location":{"filename":"src/rosetta/localization.cr","line_number":281,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L281"},"def":{"name":"l","args":[{"name":"date","external_name":"date","restriction":"Tuple(Int32, Int32, Int32)"}],"visibility":"Public","body":"Rosetta.localize_time(Time.local(*date), format)"}}]},{"html_id":"Rosetta/Rosetta/Lucky","path":"Rosetta/Lucky.html","kind":"module","full_name":"Rosetta::Lucky","name":"Lucky","abstract":false,"locations":[{"filename":"src/rosetta/lucky/integration.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/lucky/integration.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"macros":[{"html_id":"integrate-macro","name":"integrate","abstract":false,"location":{"filename":"src/rosetta/lucky/integration.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/lucky/integration.cr#L3"},"def":{"name":"integrate","visibility":"Public","body":" \n{% targets = {\"Avram::Model\", \"Avram::Operation\", \"Avram::DeleteOperation(T)\", \"Avram::SaveOperation(T)\", \"Lucky::Action\", \"Lucky::BaseComponent\"} %}\n\n\n \n{% for target in targets %}\n abstract class ::{{ target.id }}\n include Rosetta::Localizable\n include Rosetta::Translatable\n end\n {% end %}\n\n\n module ::Lucky::HTMLPage\n macro included\n include Rosetta::Localizable\n include Rosetta::Translatable\n \nend\n \nend\n\n module ::Lucky::AllowedInTags\n \nend\n\n module Rosetta::SimpleTranslation\n macro included\n include ::Lucky::AllowedInTags\n \nend\n \nend\n\n abstract struct ::Avram::I18nBackend; \nend\n\n struct Rosetta::AvramBackend < ::Avram::I18nBackend\n def get(key : String | Symbol) : String\n \n{% if true %}\n case key\n {% for val in [\"exact_size_of\", \"max_size_of\", \"min_size_of\", \"numeric_max\", \"numeric_min\"] of ::String %}\n when :validate_{{ val.id }}\n Rosetta.find(\"avram.validate_{{ val.id }}\").t(size: \"%d\")\n {% end %}\n {% for val in [\"acceptance_of\", \"at_most_one_filled\", \"confirmation_of\", \"exactly_one_filled\", \"format_of\", \"inclusion_of\", \"numeric_nil\", \"required\", \"uniqueness_of\"] of ::String %}\n when :validate_{{ val.id }}\n Rosetta.find(\"avram.validate_{{ val.id }}\").t\n {% end %}\n else\n raise \"Avram translation missing for '#{key}'\"\n end\n {% end %}\n\n \nend\n \nend\n \n"}}]},{"html_id":"Rosetta/Rosetta/Parser","path":"Rosetta/Parser.html","kind":"class","full_name":"Rosetta::Parser","name":"Parser","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/Rosetta/Parser/Checks","kind":"module","full_name":"Rosetta::Parser::Checks","name":"Checks"},{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/parser.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L11"},{"filename":"src/rosetta/parser/builder.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/builder.cr#L2"},{"filename":"src/rosetta/parser/checks.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/checks.cr#L2"},{"filename":"src/rosetta/parser/config.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"Rosetta/Rosetta/Parser/Checks","kind":"module","full_name":"Rosetta::Parser::Checks","name":"Checks"}],"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"constructors":[{"html_id":"new(config:Config)-class-method","name":"new","abstract":false,"args":[{"name":"config","external_name":"config","restriction":"Config"}],"args_string":"(config : Config)","args_html":"(config : Config)","location":{"filename":"src/rosetta/parser.cr","line_number":28,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L28"},"def":{"name":"new","args":[{"name":"config","external_name":"config","restriction":"Config"}],"visibility":"Public","body":"_ = allocate\n_.initialize(config)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"alternative_locales:Array(String)-instance-method","name":"alternative_locales","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":19,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L19"},"def":{"name":"alternative_locales","return_type":"Array(String)","visibility":"Public","body":"@alternative_locales"}},{"html_id":"available_locales(*args,**options)-instance-method","name":"available_locales","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":14,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L14"},"def":{"name":"available_locales","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.available_locales(*args, **options)"}},{"html_id":"available_locales(*args,**options,&)-instance-method","name":"available_locales","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":14,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L14"},"def":{"name":"available_locales","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.available_locales(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"config:Config-instance-method","name":"config","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":20,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L20"},"def":{"name":"config","return_type":"Config","visibility":"Public","body":"@config"}},{"html_id":"default_locale(*args,**options)-instance-method","name":"default_locale","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":15,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L15"},"def":{"name":"default_locale","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.default_locale(*args, **options)"}},{"html_id":"default_locale(*args,**options,&)-instance-method","name":"default_locale","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":15,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L15"},"def":{"name":"default_locale","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.default_locale(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"error:String|Nil-instance-method","name":"error","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":21,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L21"},"def":{"name":"error","return_type":"String | ::Nil","visibility":"Public","body":"@error"}},{"html_id":"fallback_rules(*args,**options)-instance-method","name":"fallback_rules","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":16,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L16"},"def":{"name":"fallback_rules","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.fallback_rules(*args, **options)"}},{"html_id":"fallback_rules(*args,**options,&)-instance-method","name":"fallback_rules","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":16,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L16"},"def":{"name":"fallback_rules","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.fallback_rules(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"parse!:String-instance-method","name":"parse!","doc":"Returns a list of self-containing translation modules.","summary":"

Returns a list of self-containing translation modules.

","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":39,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L39"},"def":{"name":"parse!","return_type":"String","visibility":"Public","body":"builder = Builder.new(default_locale)\nif translations.empty?\n return builder.build_locales(translations)\nend\nif valid_key_set?\nelse\n return error.to_s\nend\nbuilder.build_locales(processed_translations)\n"}},{"html_id":"path(*args,**options)-instance-method","name":"path","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":17,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L17"},"def":{"name":"path","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.path(*args, **options)"}},{"html_id":"path(*args,**options,&)-instance-method","name":"path","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":17,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L17"},"def":{"name":"path","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.path(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"pluralization_tags:Hash(String,Array(String))-instance-method","name":"pluralization_tags","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":22,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L22"},"def":{"name":"pluralization_tags","return_type":"Hash(String, Array(String))","visibility":"Public","body":"@pluralization_tags"}},{"html_id":"ruling_key_set:Array(String)-instance-method","name":"ruling_key_set","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":23,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L23"},"def":{"name":"ruling_key_set","return_type":"Array(String)","visibility":"Public","body":"@ruling_key_set"}},{"html_id":"translations:TranslationsHash-instance-method","name":"translations","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":24,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L24"},"def":{"name":"translations","return_type":"TranslationsHash","visibility":"Public","body":"@translations"}}],"types":[{"html_id":"Rosetta/Rosetta/Parser/Builder","path":"Rosetta/Parser/Builder.html","kind":"class","full_name":"Rosetta::Parser::Builder","name":"Builder","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/parser/builder.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/builder.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"},"constructors":[{"html_id":"new(default_locale:String)-class-method","name":"new","abstract":false,"args":[{"name":"default_locale","external_name":"default_locale","restriction":"String"}],"args_string":"(default_locale : String)","args_html":"(default_locale : String)","location":{"filename":"src/rosetta/parser/builder.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/builder.cr#L6"},"def":{"name":"new","args":[{"name":"default_locale","external_name":"default_locale","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(default_locale)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"build_locales(translations:TranslationsHash)-instance-method","name":"build_locales","doc":"Builds the wrapping module for all translation structs.","summary":"

Builds the wrapping module for all translation structs.

","abstract":false,"args":[{"name":"translations","external_name":"translations","restriction":"TranslationsHash"}],"args_string":"(translations : TranslationsHash)","args_html":"(translations : TranslationsHash)","location":{"filename":"src/rosetta/parser/builder.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/builder.cr#L10"},"def":{"name":"build_locales","args":[{"name":"translations","external_name":"translations","restriction":"TranslationsHash"}],"visibility":"Public","body":"\"module Rosetta\\n module Locales\\n#{(build_structs(translations)).join(\"\\n\")}\\n end\\nend\""}},{"html_id":"default_locale:String-instance-method","name":"default_locale","abstract":false,"location":{"filename":"src/rosetta/parser/builder.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/builder.cr#L4"},"def":{"name":"default_locale","visibility":"Public","body":"@default_locale"}}]},{"html_id":"Rosetta/Rosetta/Parser/Checks","path":"Rosetta/Parser/Checks.html","kind":"module","full_name":"Rosetta::Parser::Checks","name":"Checks","abstract":false,"locations":[{"filename":"src/rosetta/parser/checks.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/checks.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"}],"namespace":{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"}},{"html_id":"Rosetta/Rosetta/Parser/Config","path":"Rosetta/Parser/Config.html","kind":"class","full_name":"Rosetta::Parser::Config","name":"Config","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/YAML/Serializable","kind":"module","full_name":"YAML::Serializable","name":"Serializable"},{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/parser/config.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"Rosetta/YAML/Serializable","kind":"module","full_name":"YAML::Serializable","name":"Serializable"}],"namespace":{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"},"constructors":[{"html_id":"new(ctx:YAML::ParseContext,node:YAML::Nodes::Node)-class-method","name":"new","abstract":false,"args":[{"name":"ctx","external_name":"ctx","restriction":"YAML::ParseContext"},{"name":"node","external_name":"node","restriction":"YAML::Nodes::Node"}],"args_string":"(ctx : YAML::ParseContext, node : YAML::Nodes::Node)","args_html":"(ctx : YAML::ParseContext, node : YAML::Nodes::Node)","location":{"filename":"src/rosetta/parser/config.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L4"},"def":{"name":"new","args":[{"name":"ctx","external_name":"ctx","restriction":"YAML::ParseContext"},{"name":"node","external_name":"node","restriction":"YAML::Nodes::Node"}],"visibility":"Public","body":"new_from_yaml_node(ctx, node)"}}],"instance_methods":[{"html_id":"available_locales:Array(String)-instance-method","name":"available_locales","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L8"},"def":{"name":"available_locales","return_type":"Array(String)","visibility":"Public","body":"@available_locales"}},{"html_id":"default_locale:String-instance-method","name":"default_locale","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":7,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L7"},"def":{"name":"default_locale","return_type":"String","visibility":"Public","body":"@default_locale"}},{"html_id":"fallback_rules:Hash(String,String)|Nil-instance-method","name":"fallback_rules","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L9"},"def":{"name":"fallback_rules","return_type":"Hash(String, String) | ::Nil","visibility":"Public","body":"@fallback_rules"}},{"html_id":"path:String-instance-method","name":"path","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L6"},"def":{"name":"path","return_type":"String","visibility":"Public","body":"@path"}},{"html_id":"pluralization_rules:Hash(String,String)-instance-method","name":"pluralization_rules","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L10"},"def":{"name":"pluralization_rules","return_type":"Hash(String, String)","visibility":"Public","body":"@pluralization_rules"}},{"html_id":"pluralization_tags:Hash(String,Array(String))-instance-method","name":"pluralization_tags","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L11"},"def":{"name":"pluralization_tags","return_type":"Hash(String, Array(String))","visibility":"Public","body":"@pluralization_tags"}}]}]},{"html_id":"Rosetta/Rosetta/Pluralization","path":"Rosetta/Pluralization.html","kind":"module","full_name":"Rosetta::Pluralization","name":"Pluralization","abstract":false,"locations":[{"filename":"src/rosetta/pluralization.cr","line_number":161,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization.cr#L161"},{"filename":"src/rosetta/pluralization/rule.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule.cr#L2"},{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/arabic.cr#L2"},{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/breton.cr#L2"},{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L2"},{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/colognian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/east_slavic.cr#L2"},{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/irish.cr#L2"},{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/langi.cr#L2"},{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/latvian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/lithuanian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/macedonian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/maltese.cr#L2"},{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/manx.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_two_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_with_zero_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/polish.cr#L2"},{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/romanian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/scottish_gaelic.cr#L2"},{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/slovenian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/upper_sorbian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/welsh.cr#L2"},{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/west_slavic.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"types":[{"html_id":"Rosetta/Rosetta/Pluralization/CategoryTags","path":"Rosetta/Pluralization/CategoryTags.html","kind":"annotation","full_name":"Rosetta::Pluralization::CategoryTags","name":"CategoryTags","abstract":false,"locations":[{"filename":"src/rosetta/pluralization/rule.cr","line_number":16,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule.cr#L16"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization","kind":"module","full_name":"Rosetta::Pluralization","name":"Pluralization"},"doc":"Define required category tags using this annotation.","summary":"

Define required category tags using this annotation.

"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule","path":"Rosetta/Pluralization/Rule.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule","abstract":true,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule.cr#L11"},{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/arabic.cr#L3"},{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/breton.cr#L3"},{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L3"},{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/colognian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/east_slavic.cr#L3"},{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/irish.cr#L3"},{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/langi.cr#L3"},{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/latvian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/lithuanian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/macedonian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/maltese.cr#L3"},{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/manx.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_two_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_with_zero_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/polish.cr#L3"},{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/romanian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/scottish_gaelic.cr#L3"},{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/slovenian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/upper_sorbian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/welsh.cr#L3"},{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/west_slavic.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Arabic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Arabic","name":"Arabic"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Breton","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Breton","name":"Breton"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/CentralMoroccoTamazight","kind":"struct","full_name":"Rosetta::Pluralization::Rule::CentralMoroccoTamazight","name":"CentralMoroccoTamazight"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Colognian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Colognian","name":"Colognian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/EastSlavic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::EastSlavic","name":"EastSlavic"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Irish","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Irish","name":"Irish"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Langi","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Langi","name":"Langi"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Latvian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Latvian","name":"Latvian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Lithuanian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Lithuanian","name":"Lithuanian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Macedonian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Macedonian","name":"Macedonian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Maltese","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Maltese","name":"Maltese"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Manx","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Manx","name":"Manx"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneOther","name":"OneOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneTwoOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneTwoOther","name":"OneTwoOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneUpToTwoOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneUpToTwoOther","name":"OneUpToTwoOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneWithZeroOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneWithZeroOther","name":"OneWithZeroOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Other","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Other","name":"Other"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Polish","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Polish","name":"Polish"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Romanian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Romanian","name":"Romanian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/ScottishGaelic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::ScottishGaelic","name":"ScottishGaelic"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Slovenian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Slovenian","name":"Slovenian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/UpperSorbian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::UpperSorbian","name":"UpperSorbian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Welsh","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Welsh","name":"Welsh"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/WestSlavic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::WestSlavic","name":"WestSlavic"}],"namespace":{"html_id":"Rosetta/Rosetta/Pluralization","kind":"module","full_name":"Rosetta::Pluralization","name":"Pluralization"},"doc":"Abstract pluralization rule.\n\nA pluralization rule struct provides a main `#rule` method that, given a\n`count` number, returns the corresponding plural category tag, which\nshould be part of the common plural category tags defined\n[by the CLDR](http://cldr.unicode.org/index/cldr-spec/plural-rules):\n\n`:zero`, `:one`, `:two`, `:few`, `:many` and `:other`.","summary":"

Abstract pluralization rule.

","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/rosetta/pluralization/rule.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule.cr#L11"},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":true,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule.cr","line_number":12,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule.cr#L12"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":""}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/rosetta/pluralization/rule.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule.cr#L11"},"def":{"name":"initialize","visibility":"Public","body":""}}],"types":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Arabic","path":"Rosetta/Pluralization/Rule/Arabic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Arabic","name":"Arabic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/arabic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Arabic pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Arabic pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/arabic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif count == 0\n :zero\nelse\n if count == 1\n :one\n else\n if count == 2\n :two\n else\n if FROM_3_TO_10.includes?(mod100)\n :few\n else\n if FROM_11_TO_99.includes?(mod100)\n :many\n else\n :other\n end\n end\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Breton","path":"Rosetta/Pluralization/Rule/Breton.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Breton","name":"Breton","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/breton.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Breton pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Breton pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/breton.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif (mod10 == 1) && (!([11, 71, 91].includes?(mod100)))\n :one\nelse\n if (mod10 == 2) && (!([12, 72, 92].includes?(mod100)))\n :two\n else\n if ([3, 4, 9].includes?(mod10)) && (!((((10..19).to_a + (70..79).to_a) + (90..99).to_a).includes?(mod100)))\n :few\n else\n if ((count % 1000000) == 0) && (count != 0)\n :many\n else\n :other\n end\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/CentralMoroccoTamazight","path":"Rosetta/Pluralization/Rule/CentralMoroccoTamazight.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::CentralMoroccoTamazight","name":"CentralMoroccoTamazight","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Central Morocco Tamazight pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Central Morocco Tamazight pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ([0, 1] + (11..99).to_a).includes?(count)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Colognian","path":"Rosetta/Pluralization/Rule/Colognian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Colognian","name":"Colognian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/colognian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Colognian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Colognian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/colognian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 0\n :zero\nelse\n if count == 1\n :one\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/EastSlavic","path":"Rosetta/Pluralization/Rule/EastSlavic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::EastSlavic","name":"EastSlavic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/east_slavic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Belarusian, Bosnian, Croatian, Russian, Serbian, Serbo-Croatian, Ukrainian.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Belarusian, Bosnian, Croatian, Russian, Serbian, Serbo-Croatian, Ukrainian.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/east_slavic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif (mod10 == 1) && (mod100 != 11)\n :one\nelse\n if (FROM_2_TO_4.includes?(mod10)) && (!(FROM_12_TO_14.includes?(mod100)))\n :few\n else\n if ((mod10 == 0) || (FROM_5_TO_9.includes?(mod10))) || (FROM_11_TO_14.includes?(mod100))\n :many\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Irish","path":"Rosetta/Pluralization/Rule/Irish.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Irish","name":"Irish","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/irish.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Irish pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Irish pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/irish.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if count == 2\n :two\n else\n if FROM_3_TO_6.includes?(count)\n :few\n else\n if FROM_7_TO_10.includes?(count)\n :many\n else\n :other\n end\n end\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Langi","path":"Rosetta/Pluralization/Rule/Langi.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Langi","name":"Langi","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/langi.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Langi pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Langi pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/langi.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 0\n :zero\nelse\n if count > 0 && count < 2\n :one\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Latvian","path":"Rosetta/Pluralization/Rule/Latvian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Latvian","name":"Latvian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/latvian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Latvian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Latvian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/latvian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ((count % 10) == 1) && ((count % 100) != 11)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Lithuanian","path":"Rosetta/Pluralization/Rule/Lithuanian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Lithuanian","name":"Lithuanian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/lithuanian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Lithuanian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Lithuanian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/lithuanian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif (mod10 == 1) && (!(FROM_11_TO_19.includes?(mod100)))\n :one\nelse\n if (FROM_2_TO_9.includes?(mod10)) && (!(FROM_11_TO_19.includes?(mod100)))\n :few\n else\n :other\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Macedonian","path":"Rosetta/Pluralization/Rule/Macedonian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Macedonian","name":"Macedonian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/macedonian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Macedonian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Macedonian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/macedonian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ((count % 10) == 1) && (count != 11)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Maltese","path":"Rosetta/Pluralization/Rule/Maltese.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Maltese","name":"Maltese","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/maltese.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Maltese pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Maltese pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/maltese.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif count == 1\n :one\nelse\n if (count == 0) || (FROM_2_TO_10.includes?(mod100))\n :few\n else\n if FROM_11_TO_19.includes?(mod100)\n :many\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Manx","path":"Rosetta/Pluralization/Rule/Manx.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Manx","name":"Manx","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/manx.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Manx pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Manx pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/manx.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ([1, 2].includes?(count % 10)) || ((count % 20) == 0)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneOther","path":"Rosetta/Pluralization/Rule/OneOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneOther","name":"OneOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_other.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"The default pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

The default pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_other.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"count == 1 ? :one : :other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneTwoOther","path":"Rosetta/Pluralization/Rule/OneTwoOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneTwoOther","name":"OneTwoOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_two_other.cr#L9"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Cornish, Inari Sami, Inuktitut, Lule Sami, Nama, Northern Sami, Sami Language,\nSkolt Sami, Southern Sami.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Cornish, Inari Sami, Inuktitut, Lule Sami, Nama, Northern Sami, Sami Language, Skolt Sami, Southern Sami.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_two_other.cr#L10"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if count == 2\n :two\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneUpToTwoOther","path":"Rosetta/Pluralization/Rule/OneUpToTwoOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneUpToTwoOther","name":"OneUpToTwoOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: French, Fulah, Kabyle.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: French, Fulah, Kabyle.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"count >= 0 && count < 2 ? :one : :other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneWithZeroOther","path":"Rosetta/Pluralization/Rule/OneWithZeroOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneWithZeroOther","name":"OneWithZeroOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_with_zero_other.cr#L9"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Akan, Amharic, Bihari, Filipino, guw, Hindi, Lingala, Malagasy, Northen Sotho,\nTachelhit, Tagalog, Tigrinya, Walloon.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Akan, Amharic, Bihari, Filipino, guw, Hindi, Lingala, Malagasy, Northen Sotho, Tachelhit, Tagalog, Tigrinya, Walloon.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_with_zero_other.cr#L10"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"(count == 0) || (count == 1) ? :one : :other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Other","path":"Rosetta/Pluralization/Rule/Other.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Other","name":"Other","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/other.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"A rule that only returns the \"other\" pluralization category.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

A rule that only returns the "other" pluralization category.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/other.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":":other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Polish","path":"Rosetta/Pluralization/Rule/Polish.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Polish","name":"Polish","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/polish.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Polish pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Polish pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/polish.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif count == 1\n :one\nelse\n if ([2, 3, 4].includes?(mod10)) && (!([12, 13, 14].includes?(mod100)))\n :few\n else\n if (([0, 1] + (5..9).to_a).includes?(mod10)) || ([12, 13, 14].includes?(mod100))\n :many\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Romanian","path":"Rosetta/Pluralization/Rule/Romanian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Romanian","name":"Romanian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/romanian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Romanian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Romanian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/romanian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if (count == 0) || ((1..19).to_a.includes?(count % 100))\n :few\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/ScottishGaelic","path":"Rosetta/Pluralization/Rule/ScottishGaelic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::ScottishGaelic","name":"ScottishGaelic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/scottish_gaelic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Scottish gaelic pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Scottish gaelic pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/scottish_gaelic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if (count == 1) || (count == 11)\n :one\nelse\n if (count == 2) || (count == 12)\n :two\n else\n if (FROM_3_TO_10 + FROM_13_TO_19).includes?(count)\n :few\n else\n :other\n end\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Slovenian","path":"Rosetta/Pluralization/Rule/Slovenian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Slovenian","name":"Slovenian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/slovenian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Slovenian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Slovenian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/slovenian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif mod100 == 1\n :one\nelse\n if mod100 == 2\n :two\n else\n if (mod100 == 3) || (mod100 == 4)\n :few\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/UpperSorbian","path":"Rosetta/Pluralization/Rule/UpperSorbian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::UpperSorbian","name":"UpperSorbian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/upper_sorbian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Upper sorbian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Upper sorbian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/upper_sorbian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif mod100 == 1\n :one\nelse\n if mod100 == 2\n :two\n else\n if (mod100 == 3) || (mod100 == 4)\n :few\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Welsh","path":"Rosetta/Pluralization/Rule/Welsh.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Welsh","name":"Welsh","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/welsh.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Welsh pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Welsh pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/welsh.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"case count\nwhen 0\n :zero\nwhen 1\n :one\nwhen 2\n :two\nwhen 3\n :few\nwhen 6\n :many\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/WestSlavic","path":"Rosetta/Pluralization/Rule/WestSlavic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::WestSlavic","name":"WestSlavic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/west_slavic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Czech, Slovak.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Czech, Slovak.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/west_slavic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if FROM_2_TO_4.includes?(count)\n :few\n else\n :other\n end\nend"}}]}]}]},{"html_id":"Rosetta/Rosetta/PluralizationRules","path":"Rosetta/PluralizationRules.html","kind":"annotation","full_name":"Rosetta::PluralizationRules","name":"PluralizationRules","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":5,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/annotations.cr#L5"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/PluralizedTranslation","path":"Rosetta/PluralizedTranslation.html","kind":"module","full_name":"Rosetta::PluralizedTranslation","name":"PluralizedTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":85,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L85"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations with pluralizable values.","summary":"

Methods for translations with pluralizable values.

","instance_methods":[{"html_id":"t_hash(values:Hash)-instance-method","name":"t_hash","doc":"Using a hash for interpolation is considered unsafe since the content of\nhashes can't be checked at compile-time. Try to avoid using this method if\nyou can.","summary":"

Using a hash for interpolation is considered unsafe since the content of hashes can't be checked at compile-time.

","abstract":false,"args":[{"name":"values","external_name":"values","restriction":"Hash"}],"args_string":"(values : Hash)","args_html":"(values : Hash)","location":{"filename":"src/rosetta/translation.cr","line_number":89,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L89"},"def":{"name":"t_hash","args":[{"name":"values","external_name":"values","restriction":"Hash"}],"visibility":"Public","body":"if count = values[\"count\"]?\nelse\n message = \"Missing \\\"count\\\" from interpolation values\"\n raise(InterpolationArgumentException.new(message))\nend\nRosetta.interpolate(Rosetta.pluralize(count.to_s.to_i, raw), values)\n"}}]},{"html_id":"Rosetta/Rosetta/SimpleTranslation","path":"Rosetta/SimpleTranslation.html","kind":"module","full_name":"Rosetta::SimpleTranslation","name":"SimpleTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":60,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L60"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations without interpolations.","summary":"

Methods for translations without interpolations.

","instance_methods":[{"html_id":"t-instance-method","name":"t","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":61,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L61"},"def":{"name":"t","visibility":"Public","body":"raw"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/rosetta/translation.cr","line_number":69,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L69"},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io.puts(raw)"}},{"html_id":"to_s-instance-method","name":"to_s","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":65,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L65"},"def":{"name":"to_s","visibility":"Public","body":"raw"}}]},{"html_id":"Rosetta/Rosetta/Translatable","path":"Rosetta/Translatable.html","kind":"module","full_name":"Rosetta::Translatable","name":"Translatable","abstract":false,"locations":[{"filename":"src/rosetta/translatable.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translatable.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Include this module in any class where you need to translate many keys.","summary":"

Include this module in any class where you need to translate many keys.

","macros":[{"html_id":"r(key)-macro","name":"r","doc":"Finds the translation for the given key. If the given key starts with a\n\".\", a prefix based on the current class name will be used. Unless a\n`Rosetta::Translatable::Config` annotation is defined with a value for\n`prefix`, which will then be used instead.\n\n@[Rosetta::Translatable::Config(prefix: \"user\")]\nclass Person\n include Rosetta::Translatable\n\n def greeting\n r(\".welcome_message\").t # => key resolves to \"user.welcome_message\"\n end\nend","summary":"

Finds the translation for the given key.

","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""}],"args_string":"(key)","args_html":"(key)","location":{"filename":"src/rosetta/translatable.cr","line_number":17,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translatable.cr#L17"},"def":{"name":"r","args":[{"name":"key","external_name":"key","restriction":""}],"visibility":"Public","body":" \n{% if key.is_a?(StringLiteral) %}\n {% if key.starts_with?('.')\n config = @type.annotation(Rosetta::Translatable::Config)\n if config && config[:prefix]\n key = \"#{config[:prefix].id}#{key.id}\"\n else\n inferred_key = (@type.id.underscore.gsub(/::|\\(/, \".\")).gsub(/\\)/, \"\")\n key = \"#{inferred_key.id}#{key.id}\"\n end\nend %}\n\n Rosetta.find({{ key }})\n {% else %}\n {% raise(\"Only a StringLiteral can be used as a locale key.\\n\\n Use case to dynamically switch between locale keys. For example:\\n\\n case value\\n when \\\"one\\\"\\n r(\\\"key.option.one\\\").t\\n when \\\"two\\\"\\n r(\\\"key.option.two\\\").t\\n else\\n r(\\\"key.option.fallback\\\").t\\n end\\n\\n\") %}\n {% end %}\n\n \n"}}],"types":[{"html_id":"Rosetta/Rosetta/Translatable/Config","path":"Rosetta/Translatable/Config.html","kind":"annotation","full_name":"Rosetta::Translatable::Config","name":"Config","abstract":false,"locations":[{"filename":"src/rosetta/translatable.cr","line_number":56,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translatable.cr#L56"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Translatable","kind":"module","full_name":"Rosetta::Translatable","name":"Translatable"}}]},{"html_id":"Rosetta/Rosetta/Translation","path":"Rosetta/Translation.html","kind":"struct","full_name":"Rosetta::Translation","name":"Translation","abstract":true,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/translation.cr","line_number":50,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L50"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Base struct for translation values.","summary":"

Base struct for translation values.

","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":50,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L50"},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":50,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L50"},"def":{"name":"initialize","visibility":"Public","body":""}},{"html_id":"raw-instance-method","name":"raw","doc":"Return the raw translation value for the current locale.","summary":"

Return the raw translation value for the current locale.

","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":54,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L54"},"def":{"name":"raw","visibility":"Public","body":"translations[Rosetta.locale]"}},{"html_id":"translations-instance-method","name":"translations","abstract":true,"location":{"filename":"src/rosetta/translation.cr","line_number":51,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L51"},"def":{"name":"translations","visibility":"Public","body":""}}]},{"html_id":"Rosetta/Rosetta/Translations","path":"Rosetta/Translations.html","kind":"alias","full_name":"Rosetta::Translations","name":"Translations","abstract":false,"locations":[{"filename":"src/rosetta/parser.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Hash(String, String) | String)","aliased_html":"Hash(String, Hash(String, String) | String)","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/TranslationsHash","path":"Rosetta/TranslationsHash.html","kind":"alias","full_name":"Rosetta::TranslationsHash","name":"TranslationsHash","abstract":false,"locations":[{"filename":"src/rosetta/parser.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L9"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Hash(String, Hash(String, String) | String))","aliased_html":"Hash(String, Hash(String, Hash(String, String) | String))","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/VariantsTranslation","path":"Rosetta/VariantsTranslation.html","kind":"module","full_name":"Rosetta::VariantsTranslation","name":"VariantsTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":100,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L100"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations with variants.","summary":"

Methods for translations with variants.

","instance_methods":[{"html_id":"t_hash(values:Hash)-instance-method","name":"t_hash","doc":"Using a hash for interpolation is considered unsafe since the content of\nhashes can't be checked at compile-time. Try to avoid using this method if\nyou can.","summary":"

Using a hash for interpolation is considered unsafe since the content of hashes can't be checked at compile-time.

","abstract":false,"args":[{"name":"values","external_name":"values","restriction":"Hash"}],"args_string":"(values : Hash)","args_html":"(values : Hash)","location":{"filename":"src/rosetta/translation.cr","line_number":104,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L104"},"def":{"name":"t_hash","args":[{"name":"values","external_name":"values","restriction":"Hash"}],"visibility":"Public","body":"if variant = values[\"variant\"]?\nelse\n message = \"Missing \\\"variant\\\" from interpolation values\"\n raise(InterpolationArgumentException.new(message))\nend\nRosetta.interpolate(raw[variant], values)\n"}}]}]}]}} \ No newline at end of file diff --git a/api/main/search-index.js b/api/main/search-index.js index 0e797c9..e537219 100644 --- a/api/main/search-index.js +++ b/api/main/search-index.js @@ -1 +1 @@ -crystal_doc_search_index_callback({"repository_name":"Rosetta","body":"# Rosetta\n\n

\n \"Rosetta\n

\n\nA blazing fast internationalization (i18n) library for Crystal with compile-time\nkey lookup. You'll never have a `missing translation` in your app, ever again.\n\n![GitHub](https://img.shields.io/github/license/wout/rosetta)\n![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/wout/rosetta)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/wout/rosetta/ci.yml?branch=main)\n\n## Why use Rosetta?\n\n### You'll never have a missing translation\n\nRosetta is different from other internationalization libraries because it\nhandles key lookup at compile-time rather than runtime. The significant\nadvantage is that you'll be able to find missing translations - or typos in\nyour locale keys - during development rather than after you've deployed your\napp. This is also true for translation keys in all additional locales.\n\n### You'll never have a missing interpolation\n\nIn Rosetta, interpolation keys are arguments to the translation method. So if\nyou're missing an argument, the compiler will complain. The parser will also\ncompare interpolation keys in additional locales to the ones found in the\ndefault locale, and complain if some are missing.\n\n### Rosetta is more than 12x faster than similar libraries\n\nBenchmarking against other libraries which also use YAML or JSON backends,\nRosetta is 12x to 700x faster than any other one.\n\nFor simple translations:\n\n```\ncrimson-knight/i18n.cr translation 303.57k ( 3.29µs) (± 4.62%) 801B/op 702.21× slower\n crystal-i18n/i18n translation 18.07M ( 55.35ns) (± 7.28%) 48.0B/op 12.39× slower\n syeopite/lens translation 5.09M (196.47ns) (± 4.60%) 176B/op 43.98× slower\n wout/rosetta translation 223.86M ( 4.47ns) (± 2.20%) 0.0B/op fastest\n```\n\nFor translations with interpolations:\n\n```\ncrimson-knight/i18n.cr interpolation 318.12k ( 3.14µs) (± 0.85%) 801B/op 108.51× slower\n crystal-i18n/i18n interpolation 65.55k ( 15.26µs) (± 1.01%) 28.2kB/op 664.37× slower\n syeopite/lens interpolation 2.04M (490.17ns) (± 1.35%) 565B/op 21.35× slower\n wout/rosetta interpolation 43.55M ( 22.96ns) (± 4.81%) 80.0B/op fastest\n```\n\nRosetta is that much faster because a lot of the hard work happens at\ncompile-time. And because the majority of the data is stored on the [stack\nrather than the\nheap](https://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap),\nout of the scope of garbage collector.\n\nRead more on [the official docs page](https://wout.github.io/rosetta/latest).\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n```yaml\ndependencies:\n rosetta:\n github: wout/rosetta\n```\n\n2. Run `shards install`\n\n3. Run `bin/rosetta --init`\n\n4. Require the generated config file:\n\n```cr\n# src/app_name.cr\nrequire \"../config/rosetta\"\n```\n\n5. Include the `Rosetta::Translatable` mixin:\n\n```cr\n# src/pages/main_layout.cr\ninclude Rosetta::Translatable\n```\n\n6. Localize your app\n\n```cr\nRosetta.locale = :es\n\nclass Hello::ShowPage < MainLayout\n def content\n h1 r(\"welcome_message\").t(name: \"Brian\") # => \"¡Hola Brian!\"\n end\nend\n```\n\nRead more on [the official docs page](https://wout.github.io/rosetta/latest).\n\n## Development\n\nMake sure you have [Guardian.cr](https://github.com/f/guardian) installed. Then\nrun:\n\n```bash\n$ guardian\n```\n\nThis will automatically:\n\n- run ameba for src and spec files\n- run the relevant spec for any file in src\n- run spec file whenever they are saved\n- install shards whenever you save shard.yml\n\n## Documentation\n\n- [Reference](https://wout.github.io/rosetta/latest)\n- [API Docs](https://wout.github.io/rosetta/api/main)\n\n## Contributing\n\n### To the lib\n\n1. Fork it ()\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n### To the docs\n\nCheck out the `docs` branch and run the following command to launch the docs locally:\n\n```\ndocker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material\n```\n\n## Contributors\n\n- [wout](https://github.com/wout) - creator and maintainer\n\n## Acknowledgements\n\nThis shard pulls inspiration from the following projects:\n\n- [crimson-knight/i18n.cr](https://github.com/crimson-knight/i18n.cr)\n- [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n)\n- [syeopite/lens](https://github.com/syeopite/lens)\n- [Rails](https://github.com/rails/rails)\n","program":{"html_id":"Rosetta/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"locations":[],"repository_name":"Rosetta","program":true,"enum":false,"alias":false,"const":false,"types":[{"html_id":"Rosetta/Rosetta","path":"Rosetta.html","kind":"module","full_name":"Rosetta","name":"Rosetta","abstract":false,"locations":[{"filename":"src/rosetta/aliases.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/aliases.cr#L1"},{"filename":"src/rosetta/annotations.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/annotations.cr#L1"},{"filename":"src/rosetta/backend.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/backend.cr#L1"},{"filename":"src/rosetta/config.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/config.cr#L1"},{"filename":"src/rosetta/configuration.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/configuration.cr#L4"},{"filename":"src/rosetta/interpolation.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/interpolation.cr#L1"},{"filename":"src/rosetta/localizable.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L1"},{"filename":"src/rosetta/localization.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L1"},{"filename":"src/rosetta/lucky/integration.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/lucky/integration.cr#L1"},{"filename":"src/rosetta/parser.cr","line_number":7,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L7"},{"filename":"src/rosetta/parser/builder.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/builder.cr#L1"},{"filename":"src/rosetta/parser/checks.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/checks.cr#L1"},{"filename":"src/rosetta/parser/config.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L1"},{"filename":"src/rosetta/pluralization.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization.cr#L1"},{"filename":"src/rosetta/pluralization/rule.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule.cr#L1"},{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/arabic.cr#L1"},{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/breton.cr#L1"},{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L1"},{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/colognian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/east_slavic.cr#L1"},{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/irish.cr#L1"},{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/langi.cr#L1"},{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/latvian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/lithuanian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/macedonian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/maltese.cr#L1"},{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/manx.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_two_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_with_zero_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/polish.cr#L1"},{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/romanian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/scottish_gaelic.cr#L1"},{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/slovenian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/upper_sorbian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/welsh.cr#L1"},{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/west_slavic.cr#L1"},{"filename":"src/rosetta/translatable.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translatable.cr#L1"},{"filename":"src/rosetta/translation.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L1"},{"filename":"src/rosetta/version.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/version.cr#L1"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"VERSION","name":"VERSION","value":"{{ (`shards version \\\"/home/runner/work/rosetta/rosetta/src/rosetta\\\"`).chomp.stringify }}"}],"class_methods":[{"html_id":"distance_of_time_in_words(from:Time,to:Time):String-class-method","name":"distance_of_time_in_words","doc":"Returns a `String` with approximate distance in time between `from` and\n`to`. For example:\n\n```\nRosetta.distance_of_time_in_words(\n Time.utc(2021, 10, 15, 8, 0, 0),\n Time.utc(2021, 10, 15, 8, 0, 5))\n)\n# => \"5 seconds\"\n```\n\nMost of the code for this method is borrowed from Lucky.","summary":"

Returns a String with approximate distance in time between from and to.

","abstract":false,"args":[{"name":"from","external_name":"from","restriction":"Time"},{"name":"to","external_name":"to","restriction":"Time"}],"args_string":"(from : Time, to : Time) : String","args_html":"(from : Time, to : Time) : String","location":{"filename":"src/rosetta/localization.cr","line_number":77,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L77"},"def":{"name":"distance_of_time_in_words","args":[{"name":"from","external_name":"from","restriction":"Time"},{"name":"to","external_name":"to","restriction":"Time"}],"return_type":"String","visibility":"Public","body":"minutes = (to - from).minutes\nseconds = (to - from).seconds\nhours = (to - from).hours\ndays = (to - from).days\nif days != 0\n return distance_in_days(days)\nend\nif hours != 0\n return distance_in_hours(hours)\nend\nif minutes != 0\n return distance_in_minutes(minutes)\nend\ndistance_in_seconds(seconds)\n"}},{"html_id":"interpolate(translation:String,values:Hash|NamedTuple)-class-method","name":"interpolate","doc":"Interpolates a given string with the values from the given hash or named\ntuple.","summary":"

Interpolates a given string with the values from the given hash or named tuple.

","abstract":false,"args":[{"name":"translation","external_name":"translation","restriction":"String"},{"name":"values","external_name":"values","restriction":"Hash | NamedTuple"}],"args_string":"(translation : String, values : Hash | NamedTuple)","args_html":"(translation : String, values : Hash | NamedTuple)","location":{"filename":"src/rosetta/interpolation.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/interpolation.cr#L4"},"def":{"name":"interpolate","args":[{"name":"translation","external_name":"translation","restriction":"String"},{"name":"values","external_name":"values","restriction":"Hash | NamedTuple"}],"visibility":"Public","body":"values.each do |key, value|\n translation = if value.is_a?(Time)\n localize_time(value, translation)\n else\n if value.is_a?(Tuple(Int32, Int32, Int32))\n localize_time(Time.local(*value), translation)\n else\n translation.gsub(/\\%\\{#{key}\\}/, value)\n end\n end\nend\ntranslation\n"}},{"html_id":"locale:String-class-method","name":"locale","doc":"Gets the current locale at runtime using the config instance stored in the\ncurrent fiber.","summary":"

Gets the current locale at runtime using the config instance stored in the current fiber.

","abstract":false,"location":{"filename":"src/rosetta/configuration.cr","line_number":24,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/configuration.cr#L24"},"def":{"name":"locale","return_type":"String","visibility":"Public","body":"config.locale"}},{"html_id":"locale=(locale:String|Symbol)-class-method","name":"locale=","doc":"Sets the current locale at runtime using the config instance stored in the\ncurrent fiber.","summary":"

Sets the current locale at runtime using the config instance stored in the current fiber.

","abstract":false,"args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"args_string":"(locale : String | Symbol)","args_html":"(locale : String | Symbol)","location":{"filename":"src/rosetta/configuration.cr","line_number":18,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/configuration.cr#L18"},"def":{"name":"locale=","args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"visibility":"Public","body":"config.locale = locale"}},{"html_id":"localize_time(time:Time,format:String)-class-method","name":"localize_time","doc":"Uses a given format to localize a given Time object, for example:\n\n```\nRosetta.localize_time(Time.local, \"%d %b %Y %H:%M:%S\")\n```","summary":"

Uses a given format to localize a given Time object, for example:

","abstract":false,"args":[{"name":"time","external_name":"time","restriction":"Time"},{"name":"format","external_name":"format","restriction":"String"}],"args_string":"(time : Time, format : String)","args_html":"(time : Time, format : String)","location":{"filename":"src/rosetta/localization.cr","line_number":63,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L63"},"def":{"name":"localize_time","args":[{"name":"time","external_name":"time","restriction":"Time"},{"name":"format","external_name":"format","restriction":"String"}],"visibility":"Public","body":"time.to_s(localize_day_and_month_names(time, format))"}},{"html_id":"localize_time(time:Tuple(Int32,Int32,Int32),format:String)-class-method","name":"localize_time","abstract":false,"args":[{"name":"time","external_name":"time","restriction":"Tuple(Int32, Int32, Int32)"},{"name":"format","external_name":"format","restriction":"String"}],"args_string":"(time : Tuple(Int32, Int32, Int32), format : String)","args_html":"(time : Tuple(Int32, Int32, Int32), format : String)","location":{"filename":"src/rosetta/localization.cr","line_number":70,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L70"},"def":{"name":"localize_time","args":[{"name":"time","external_name":"time","restriction":"Tuple(Int32, Int32, Int32)"},{"name":"format","external_name":"format","restriction":"String"}],"visibility":"Public","body":"localize_time(Time.local(*time), format)"}},{"html_id":"pluralize(count:Rosetta::CountArg,translation:NamedTuple,rule:Pluralization::Rule=Pluralization::RULES[Rosetta.locale].new)-class-method","name":"pluralize","doc":"Pluralizes a given pluralizable translation.","summary":"

Pluralizes a given pluralizable translation.

","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"},{"name":"translation","external_name":"translation","restriction":"NamedTuple"},{"name":"rule","default_value":"Pluralization::RULES[Rosetta.locale].new","external_name":"rule","restriction":"Pluralization::Rule"}],"args_string":"(count : Rosetta::CountArg, translation : NamedTuple, rule : Pluralization::Rule = Pluralization::RULES[Rosetta.locale].new)","args_html":"(count : Rosetta::CountArg, translation : NamedTuple, rule : Pluralization::Rule = Pluralization::RULES[Rosetta.locale].new)","location":{"filename":"src/rosetta/pluralization.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization.cr#L3"},"def":{"name":"pluralize","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"},{"name":"translation","external_name":"translation","restriction":"NamedTuple"},{"name":"rule","default_value":"Pluralization::RULES[Rosetta.locale].new","external_name":"rule","restriction":"Pluralization::Rule"}],"visibility":"Public","body":"if (count == 0) && translation[:zero]?\n return translation[:zero]?.to_s\nend\ntranslation[rule.apply(count)]\n"}},{"html_id":"time_ago_in_words(from:Time):String-class-method","name":"time_ago_in_words","doc":"Returns a `String` with approximate distance in time between `from` and\ncurrent moment.\n\n```\ntime_ago_in_words(Time.utc(2019, 8, 30))\n# => \"about a month\"\n# gives the same result as:\ndistance_of_time_in_words(Time.utc(2019, 8, 30), Time.utc)\n# => \"about a month\"\n```\n\nSee more examples in `#distance_of_time_in_words`.","summary":"

Returns a String with approximate distance in time between from and current moment.

","abstract":false,"args":[{"name":"from","external_name":"from","restriction":"Time"}],"args_string":"(from : Time) : String","args_html":"(from : Time) : String","location":{"filename":"src/rosetta/localization.cr","line_number":77,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L77"},"def":{"name":"time_ago_in_words","args":[{"name":"from","external_name":"from","restriction":"Time"}],"return_type":"String","visibility":"Public","body":"distance_of_time_in_words(from, Time.utc)"}},{"html_id":"time_from_now_in_words(to:Time):String-class-method","name":"time_from_now_in_words","doc":"Returns a `String` with approximate distance in time between current\nmoment and future date.\n\n```\ntime_from_now_in_words(Time.utc(2022, 8, 30))\n# => \"about a year\"\n# gives the same result as:\ndistance_of_time_in_words(Time.utc, Time.utc(2022, 8, 30))\n# => \"about a year\"\n```\n\nSee more examples in `#distance_of_time_in_words`.","summary":"

Returns a String with approximate distance in time between current moment and future date.

","abstract":false,"args":[{"name":"to","external_name":"to","restriction":"Time"}],"args_string":"(to : Time) : String","args_html":"(to : Time) : String","location":{"filename":"src/rosetta/localization.cr","line_number":77,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L77"},"def":{"name":"time_from_now_in_words","args":[{"name":"to","external_name":"to","restriction":"Time"}],"return_type":"String","visibility":"Public","body":"distance_of_time_in_words(Time.utc, to)"}},{"html_id":"with_locale(locale:String|Symbol,&)-class-method","name":"with_locale","doc":"Temporarily use a different locale.","summary":"

Temporarily use a different locale.

","abstract":false,"args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"args_string":"(locale : String | Symbol, &)","args_html":"(locale : String | Symbol, &)","location":{"filename":"src/rosetta/translation.cr","line_number":41,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L41"},"def":{"name":"with_locale","args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"yields":0,"block_arity":0,"visibility":"Public","body":"begin\n current_locale = Rosetta.locale\n Rosetta.locale = locale\n yield\nensure\n Rosetta.locale = current_locale || default_locale\nend"}}],"macros":[{"html_id":"available_locales-macro","name":"available_locales","doc":"Fetches the available locales from the corresponding annotation.","summary":"

Fetches the available locales from the corresponding annotation.

","abstract":false,"location":{"filename":"src/rosetta/configuration.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/configuration.cr#L11"},"def":{"name":"available_locales","visibility":"Public","body":" \n{% locales = (@type.annotation(Rosetta::AvailableLocales)).args %}\n\n [\n{{ locales.map() do |__arg0|\n __arg0.id.stringify\nend.splat }}\n]\n \n"}},{"html_id":"date(format=:default)-macro","name":"date","doc":"Localizes a date, for example:\n\n```\nRosetta.date.t(Time.local)\nRosetta.date.t({2021, 8, 20})\nRosetta.date(:long).l(Time.local)\nRosetta.date(\"%a, %d %b %Y\").l(Time.local.date)\n```","summary":"

Localizes a date, for example:

","abstract":false,"args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"args_string":"(format = :default)","args_html":"(format = :default)","location":{"filename":"src/rosetta/localization.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L10"},"def":{"name":"date","args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"visibility":"Public","body":" \n{% if format.is_a?(SymbolLiteral) %}\n format = Rosetta.find(\"rosetta_localization.date.formats.{{ format.id }}\")\n {% else %}\n format = {{ format }}\n {% end %}\n\n\n Rosetta::LocalizedTime.new(format)\n \n"}},{"html_id":"default_locale-macro","name":"default_locale","doc":"Fetches the default locale from the corresponding annotation.","summary":"

Fetches the default locale from the corresponding annotation.

","abstract":false,"location":{"filename":"src/rosetta/configuration.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/configuration.cr#L6"},"def":{"name":"default_locale","visibility":"Public","body":" \n{{ (@type.annotation(Rosetta::DefaultLocale)).args.first.id.stringify }}\n\n \n"}},{"html_id":"find(key)-macro","name":"find","doc":"Finds the translations for the given key as a dedicated class instance for\nthe translation, which inherits from `Rosetta::Translation`.\n\nIf the key does not exist, a compile error will be raised.","summary":"

Finds the translations for the given key as a dedicated class instance for the translation, which inherits from Rosetta::Translation.

","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""}],"args_string":"(key)","args_html":"(key)","location":{"filename":"src/rosetta/translation.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L6"},"def":{"name":"find","args":[{"name":"key","external_name":"key","restriction":""}],"visibility":"Public","body":" \n{% if key.is_a?(StringLiteral) %}\n {% class_name_from_key = (key.split('.')).map(&.camelcase).join('_')\ntranslation_class_name = \"#{class_name_from_key.id}Translation\".id\n %}\n\n {% if Rosetta::Locales.has_constant?(translation_class_name) %}\n Rosetta::Locales::{{ translation_class_name.id }}.new\n {% else %}\n {% raise(\"Missing translation for #{key} in all locales\") %}\n {% end %}\n {% else %}\n {% raise(\"Only a StringLiteral can be used as a locale key.\\n\\n Use case to dynamically switch between locale keys. For example:\\n\\n case value\\n when \\\"one\\\"\\n Rosetta.find(\\\"key.option.one\\\").t\\n when \\\"two\\\"\\n Rosetta.find(\\\"key.option.two\\\").t\\n else\\n Rosetta.find(\\\"key.option.fallback\\\").t\\n end\\n\\n\") %}\n {% end %}\n\n \n"}},{"html_id":"number(format=:default)-macro","name":"number","doc":"Localizes a numeric value, for example:\n\n```\nRosetta.number.t(123_456.789)\nRosetta.number(:custom).l(123_456.789)\n```","summary":"

Localizes a numeric value, for example:

","abstract":false,"args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"args_string":"(format = :default)","args_html":"(format = :default)","location":{"filename":"src/rosetta/localization.cr","line_number":43,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L43"},"def":{"name":"number","args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"visibility":"Public","body":" \n{% namespace = \"Rosetta::Locales::RosettaLocalization_Number_Formats\".id\nprefix = \"#{namespace}_#{format.id.camelcase}\".id\n %}\n\n\n Rosetta::LocalizedNumber.new(\n separator: \n{{ prefix }}\n_SeparatorTranslation.new.to_s,\n delimiter: \n{{ prefix }}\n_DelimiterTranslation.new.to_s,\n decimal_places: \n{{ prefix }}\n_DecimalPlacesTranslation.new.to_s.to_i,\n group: \n{{ prefix }}\n_GroupTranslation.new.to_s.to_i,\n only_significant: \n{{ prefix }}\n_OnlySignificantTranslation.new.to_s == \"true\"\n )\n \n"}},{"html_id":"time(format=:default)-macro","name":"time","doc":"Localizes time, for example:\n\n```\nRosetta.time.t(Time.local)\nRosetta.time(:short).l(Time.local)\nRosetta.time(\"%d %b %Y %H:%M:%S\").l(Time.local)\n```","summary":"

Localizes time, for example:

","abstract":false,"args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"args_string":"(format = :default)","args_html":"(format = :default)","location":{"filename":"src/rosetta/localization.cr","line_number":27,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L27"},"def":{"name":"time","args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"visibility":"Public","body":" \n{% if format.is_a?(SymbolLiteral) %}\n format = Rosetta.find(\"rosetta_localization.time.formats.{{ format.id }}\")\n {% else %}\n format = {{ format }}\n {% end %}\n\n\n Rosetta::LocalizedTime.new(format)\n \n"}}],"types":[{"html_id":"Rosetta/Rosetta/AvailableLocales","path":"Rosetta/AvailableLocales.html","kind":"annotation","full_name":"Rosetta::AvailableLocales","name":"AvailableLocales","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/annotations.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/Backend","path":"Rosetta/Backend.html","kind":"module","full_name":"Rosetta::Backend","name":"Backend","abstract":false,"locations":[{"filename":"src/rosetta/backend.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/backend.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"macros":[{"html_id":"load(path)-macro","name":"load","doc":"Loads the parsed set of locales from the given path. This macro should be\ncalled in an initializer:\n\n```\nRosetta::Backend.load(\"config/locales\")\n```","summary":"

Loads the parsed set of locales from the given path.

","abstract":false,"args":[{"name":"path","external_name":"path","restriction":""}],"args_string":"(path)","args_html":"(path)","location":{"filename":"src/rosetta/backend.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/backend.cr#L9"},"def":{"name":"load","args":[{"name":"path","external_name":"path","restriction":""}],"visibility":"Public","body":" \n{% anno = Rosetta.annotation(Rosetta::DefaultLocale)\nif anno.nil? || (default_locale = anno.args.first).nil?\n raise(\"\\n No default locale is defined. Add an annotation with exactly one value:\\n\\n + @[Rosetta::DefaultLocale(:en)]\\n @[Rosetta::AvailableLocales(:en, :fr, :nl)]\\n module Rosetta\\n end\\n\")\nend\n %}\n\n\n \n{% anno = Rosetta.annotation(Rosetta::AvailableLocales)\nif anno.nil? || (available_locales = anno.args).empty?\n raise(\"\\n No available locales defined. Add an annotation with at least one value:\\n\\n @[Rosetta::DefaultLocale(:en)]\\n + @[Rosetta::AvailableLocales(:en, :fr, :nl)]\\n module Rosetta\\n end\\n\")\nend\n %}\n\n\n \n{% fallback_rules = [] of ::String\nanno = Rosetta.annotation(Rosetta::FallbackRules)\nif anno && (rules = anno.args.first)\n rules.each do |locale, fallback|\n fallback_rules.push(\" #{locale.id}: #{fallback.id}\")\n end\nend\n %}\n\n\n \n{% rules = (Rosetta::Pluralization.annotation(Rosetta::DefaultPluralizationRules)).args.first\nanno = Rosetta.annotation(Rosetta::PluralizationRules)\nif anno && (custom_rules = anno.args.first)\n custom_rules.each do |locale, rule|\n rules[locale] = rule\n end\nend\n %}\n\n\n Rosetta::Pluralization::RULES = \n{{ rules }}\n\n\n \n{% pluralization_rules = [] of String\npluralization_tags = [] of String\navailable_locales.each do |locale|\n rule = rules[locale] || rules[(locale.split(\"-\")).first]\n unless rule\n raise(\"No pluralization rule is defined for \\\"#{locale.id}\\\"\")\n end\n rule = rule.resolve\n anno = rule.annotation(Rosetta::Pluralization::CategoryTags)\n if anno\n pluralization_tags.push(\" #{rule}: [#{(anno.args.join(',')).id}]\")\n else\n raise(\"#{rule} is missing a CategoryTags annotation\")\n end\n pluralization_rules.push(\" #{locale.id}: #{rule}\")\nend\n %}\n\n\n \n{% yaml = \"path: #{path.id}\\ndefault_locale: #{default_locale.id}\\navailable_locales: [#{(available_locales.join(',')).id}]\\nfallback_rules:\\n#{(fallback_rules.join(\"\\n\")).id}\\npluralization_rules:\\n#{(pluralization_rules.join(\"\\n\")).id}\\npluralization_tags:\\n#{(pluralization_tags.uniq.join(\"\\n\")).id}\"\ntranslations = run(\"./runner\", yaml)\nif !(translations.stringify.starts_with?(\"module Rosetta\"))\n raise(translations.stringify)\nend\n %}\n\n\n \n{{ translations }}\n\n \n"}}]},{"html_id":"Rosetta/Rosetta/Config","path":"Rosetta/Config.html","kind":"class","full_name":"Rosetta::Config","name":"Config","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/config.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/config.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"instance_methods":[{"html_id":"locale:String-instance-method","name":"locale","doc":"Gets the current locale or falls back to the default locale if it's not\ndefined.","summary":"

Gets the current locale or falls back to the default locale if it's not defined.

","abstract":false,"location":{"filename":"src/rosetta/config.cr","line_number":18,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/config.cr#L18"},"def":{"name":"locale","return_type":"String","visibility":"Public","body":"(@locale || Rosetta.default_locale)"}},{"html_id":"locale=(locale:String|Symbol)-instance-method","name":"locale=","doc":"Sets the current locale with the given value, if it's found in the\navailable locales.","summary":"

Sets the current locale with the given value, if it's found in the available locales.

","abstract":false,"args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"args_string":"(locale : String | Symbol)","args_html":"(locale : String | Symbol)","location":{"filename":"src/rosetta/config.cr","line_number":7,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/config.cr#L7"},"def":{"name":"locale=","args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"visibility":"Public","body":"@locale = if Rosetta.available_locales.map(&.to_s).includes?(locale.to_s)\n locale.to_s\nelse\n Rosetta.default_locale\nend"}}]},{"html_id":"Rosetta/Rosetta/CountArg","path":"Rosetta/CountArg.html","kind":"alias","full_name":"Rosetta::CountArg","name":"CountArg","abstract":false,"locations":[{"filename":"src/rosetta/aliases.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/aliases.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"(Float64 | Int32 | Int64)","aliased_html":"Float64 | Int32 | Int64","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/DefaultLocale","path":"Rosetta/DefaultLocale.html","kind":"annotation","full_name":"Rosetta::DefaultLocale","name":"DefaultLocale","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/annotations.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/DefaultPluralizationRules","path":"Rosetta/DefaultPluralizationRules.html","kind":"annotation","full_name":"Rosetta::DefaultPluralizationRules","name":"DefaultPluralizationRules","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/annotations.cr#L6"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/FallbackRules","path":"Rosetta/FallbackRules.html","kind":"annotation","full_name":"Rosetta::FallbackRules","name":"FallbackRules","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/annotations.cr#L4"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/Fallbacks","path":"Rosetta/Fallbacks.html","kind":"alias","full_name":"Rosetta::Fallbacks","name":"Fallbacks","abstract":false,"locations":[{"filename":"src/rosetta/aliases.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/aliases.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"(Array(String) | Hash(String, Array(String) | String) | Nil)","aliased_html":"Array(String) | Hash(String, Array(String) | String) | Nil","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/InterpolatedTranslation","path":"Rosetta/InterpolatedTranslation.html","kind":"module","full_name":"Rosetta::InterpolatedTranslation","name":"InterpolatedTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":75,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L75"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations with interpolations.","summary":"

Methods for translations with interpolations.

","instance_methods":[{"html_id":"t_hash(values:Hash)-instance-method","name":"t_hash","doc":"Using a hash for interpolation is considered unsafe since the content of\nhashes can't be checked at compile-time. Try to avoid using this method if\nyou can.","summary":"

Using a hash for interpolation is considered unsafe since the content of hashes can't be checked at compile-time.

","abstract":false,"args":[{"name":"values","external_name":"values","restriction":"Hash"}],"args_string":"(values : Hash)","args_html":"(values : Hash)","location":{"filename":"src/rosetta/translation.cr","line_number":79,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L79"},"def":{"name":"t_hash","args":[{"name":"values","external_name":"values","restriction":"Hash"}],"visibility":"Public","body":"Rosetta.interpolate(raw, values)"}}]},{"html_id":"Rosetta/Rosetta/InterpolationArgumentException","path":"Rosetta/InterpolationArgumentException.html","kind":"class","full_name":"Rosetta::InterpolationArgumentException","name":"InterpolationArgumentException","abstract":false,"superclass":{"html_id":"Rosetta/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"Rosetta/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/interpolation.cr","line_number":21,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/interpolation.cr#L21"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/Localizable","path":"Rosetta/Localizable.html","kind":"module","full_name":"Rosetta::Localizable","name":"Localizable","abstract":false,"locations":[{"filename":"src/rosetta/localizable.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Include this module in any class where you need to localize many values.","summary":"

Include this module in any class where you need to localize many values.

","instance_methods":[{"html_id":"distance_of_time_in_words(*args,**options)-instance-method","name":"distance_of_time_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/localizable.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L4"},"def":{"name":"distance_of_time_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"Rosetta.distance_of_time_in_words(*args, **options)"}},{"html_id":"distance_of_time_in_words(*args,**options,&)-instance-method","name":"distance_of_time_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/localizable.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L4"},"def":{"name":"distance_of_time_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"Rosetta.distance_of_time_in_words(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"time_ago_in_words(*args,**options)-instance-method","name":"time_ago_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/localizable.cr","line_number":5,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L5"},"def":{"name":"time_ago_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"Rosetta.time_ago_in_words(*args, **options)"}},{"html_id":"time_ago_in_words(*args,**options,&)-instance-method","name":"time_ago_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/localizable.cr","line_number":5,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L5"},"def":{"name":"time_ago_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"Rosetta.time_ago_in_words(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"time_from_now_in_words(*args,**options)-instance-method","name":"time_from_now_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/localizable.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L6"},"def":{"name":"time_from_now_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"Rosetta.time_from_now_in_words(*args, **options)"}},{"html_id":"time_from_now_in_words(*args,**options,&)-instance-method","name":"time_from_now_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/localizable.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L6"},"def":{"name":"time_from_now_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"Rosetta.time_from_now_in_words(*args, **options) do |*yield_args|\n yield *yield_args\nend"}}],"macros":[{"html_id":"r_date(format)-macro","name":"r_date","doc":"Finds the translations for a given format to localize a date","summary":"

Finds the translations for a given format to localize a date

","abstract":false,"args":[{"name":"format","external_name":"format","restriction":""}],"args_string":"(format)","args_html":"(format)","location":{"filename":"src/rosetta/localizable.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L9"},"def":{"name":"r_date","args":[{"name":"format","external_name":"format","restriction":""}],"visibility":"Public","body":" Rosetta.date(\n{{ format }}\n)\n \n"}},{"html_id":"r_number(format)-macro","name":"r_number","doc":"Finds the translations for a given format to localize a number","summary":"

Finds the translations for a given format to localize a number

","abstract":false,"args":[{"name":"format","external_name":"format","restriction":""}],"args_string":"(format)","args_html":"(format)","location":{"filename":"src/rosetta/localizable.cr","line_number":19,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L19"},"def":{"name":"r_number","args":[{"name":"format","external_name":"format","restriction":""}],"visibility":"Public","body":" Rosetta.number(\n{{ format }}\n)\n \n"}},{"html_id":"r_time(format)-macro","name":"r_time","doc":"Finds the translations for a given format to localize a time","summary":"

Finds the translations for a given format to localize a time

","abstract":false,"args":[{"name":"format","external_name":"format","restriction":""}],"args_string":"(format)","args_html":"(format)","location":{"filename":"src/rosetta/localizable.cr","line_number":14,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localizable.cr#L14"},"def":{"name":"r_time","args":[{"name":"format","external_name":"format","restriction":""}],"visibility":"Public","body":" Rosetta.time(\n{{ format }}\n)\n \n"}}]},{"html_id":"Rosetta/Rosetta/LocalizedNumber","path":"Rosetta/LocalizedNumber.html","kind":"struct","full_name":"Rosetta::LocalizedNumber","name":"LocalizedNumber","abstract":false,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/localization.cr","line_number":288,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L288"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"LocalizedNumber is similar to a Translation object; it implements a similar\ninterface but its sole purpose is to localize numeric objects.","summary":"

LocalizedNumber is similar to a Translation object; it implements a similar interface but its sole purpose is to localize numeric objects.

","constructors":[{"html_id":"new(separator:String|Char,delimiter:String|Char,decimal_places:Int32,group:Int32,only_significant:Bool)-class-method","name":"new","abstract":false,"args":[{"name":"separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","external_name":"group","restriction":"Int32"},{"name":"only_significant","external_name":"only_significant","restriction":"Bool"}],"args_string":"(separator : String | Char, delimiter : String | Char, decimal_places : Int32, group : Int32, only_significant : Bool)","args_html":"(separator : String | Char, delimiter : String | Char, decimal_places : Int32, group : Int32, only_significant : Bool)","location":{"filename":"src/rosetta/localization.cr","line_number":289,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L289"},"def":{"name":"new","args":[{"name":"separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","external_name":"group","restriction":"Int32"},{"name":"only_significant","external_name":"only_significant","restriction":"Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(separator, delimiter, decimal_places, group, only_significant)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"l(number:Number,separator:String|Char=@separator,delimiter:String|Char=@delimiter,decimal_places:Int32=@decimal_places,group:Int32=@group,only_significant:Bool=@only_significant)-instance-method","name":"l","abstract":false,"args":[{"name":"number","external_name":"number","restriction":"Number"},{"name":"separator","default_value":"@separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","default_value":"@delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","default_value":"@decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","default_value":"@group","external_name":"group","restriction":"Int32"},{"name":"only_significant","default_value":"@only_significant","external_name":"only_significant","restriction":"Bool"}],"args_string":"(number : Number, separator : String | Char = @separator, delimiter : String | Char = @delimiter, decimal_places : Int32 = @decimal_places, group : Int32 = @group, only_significant : Bool = @only_significant)","args_html":"(number : Number, separator : String | Char = @separator, delimiter : String | Char = @delimiter, decimal_places : Int32 = @decimal_places, group : Int32 = @group, only_significant : Bool = @only_significant)","location":{"filename":"src/rosetta/localization.cr","line_number":298,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L298"},"def":{"name":"l","args":[{"name":"number","external_name":"number","restriction":"Number"},{"name":"separator","default_value":"@separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","default_value":"@delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","default_value":"@decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","default_value":"@group","external_name":"group","restriction":"Int32"},{"name":"only_significant","default_value":"@only_significant","external_name":"only_significant","restriction":"Bool"}],"visibility":"Public","body":"number.format(separator: separator, delimiter: delimiter, decimal_places: decimal_places, group: group, only_significant: only_significant)"}}]},{"html_id":"Rosetta/Rosetta/LocalizedTime","path":"Rosetta/LocalizedTime.html","kind":"struct","full_name":"Rosetta::LocalizedTime","name":"LocalizedTime","abstract":false,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/localization.cr","line_number":267,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L267"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"LocalizedTime is similar to a Translation object; it implements a similar\ninterface but its sole purpose is to localize time objects.","summary":"

LocalizedTime is similar to a Translation object; it implements a similar interface but its sole purpose is to localize time objects.

","constructors":[{"html_id":"new(format:String)-class-method","name":"new","abstract":false,"args":[{"name":"format","external_name":"format","restriction":"String"}],"args_string":"(format : String)","args_html":"(format : String)","location":{"filename":"src/rosetta/localization.cr","line_number":274,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L274"},"def":{"name":"new","args":[{"name":"format","external_name":"format","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(format)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(translation:Translation)-class-method","name":"new","abstract":false,"args":[{"name":"translation","external_name":"translation","restriction":"Translation"}],"args_string":"(translation : Translation)","args_html":"(translation : Translation)","location":{"filename":"src/rosetta/localization.cr","line_number":270,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L270"},"def":{"name":"new","args":[{"name":"translation","external_name":"translation","restriction":"Translation"}],"visibility":"Public","body":"_ = allocate\n_.initialize(translation)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"format:String-instance-method","name":"format","abstract":false,"location":{"filename":"src/rosetta/localization.cr","line_number":268,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L268"},"def":{"name":"format","visibility":"Public","body":"@format"}},{"html_id":"l(time:Time)-instance-method","name":"l","abstract":false,"args":[{"name":"time","external_name":"time","restriction":"Time"}],"args_string":"(time : Time)","args_html":"(time : Time)","location":{"filename":"src/rosetta/localization.cr","line_number":277,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L277"},"def":{"name":"l","args":[{"name":"time","external_name":"time","restriction":"Time"}],"visibility":"Public","body":"Rosetta.localize_time(time, format)"}},{"html_id":"l(date:Tuple(Int32,Int32,Int32))-instance-method","name":"l","abstract":false,"args":[{"name":"date","external_name":"date","restriction":"Tuple(Int32, Int32, Int32)"}],"args_string":"(date : Tuple(Int32, Int32, Int32))","args_html":"(date : Tuple(Int32, Int32, Int32))","location":{"filename":"src/rosetta/localization.cr","line_number":281,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/localization.cr#L281"},"def":{"name":"l","args":[{"name":"date","external_name":"date","restriction":"Tuple(Int32, Int32, Int32)"}],"visibility":"Public","body":"Rosetta.localize_time(Time.local(*date), format)"}}]},{"html_id":"Rosetta/Rosetta/Lucky","path":"Rosetta/Lucky.html","kind":"module","full_name":"Rosetta::Lucky","name":"Lucky","abstract":false,"locations":[{"filename":"src/rosetta/lucky/integration.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/lucky/integration.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"macros":[{"html_id":"integrate-macro","name":"integrate","abstract":false,"location":{"filename":"src/rosetta/lucky/integration.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/lucky/integration.cr#L3"},"def":{"name":"integrate","visibility":"Public","body":" \n{% targets = {\"Avram::Model\", \"Avram::Operation\", \"Avram::SaveOperation(T)\", \"Lucky::Action\", \"Lucky::BaseComponent\"} %}\n\n\n \n{% for target in targets %}\n abstract class ::{{ target.id }}\n include Rosetta::Localizable\n include Rosetta::Translatable\n end\n {% end %}\n\n\n module ::Lucky::HTMLPage\n macro included\n include Rosetta::Localizable\n include Rosetta::Translatable\n \nend\n \nend\n\n module ::Lucky::AllowedInTags\n \nend\n\n module Rosetta::SimpleTranslation\n macro included\n include ::Lucky::AllowedInTags\n \nend\n \nend\n\n abstract struct ::Avram::I18nBackend; \nend\n\n struct Rosetta::AvramBackend < ::Avram::I18nBackend\n def get(key : String | Symbol) : String\n \n{% if true %}\n case key\n {% for val in [\"exact_size_of\", \"max_size_of\", \"min_size_of\", \"numeric_max\", \"numeric_min\"] of ::String %}\n when :validate_{{ val.id }}\n Rosetta.find(\"avram.validate_{{ val.id }}\").t(size: \"%d\")\n {% end %}\n {% for val in [\"acceptance_of\", \"at_most_one_filled\", \"confirmation_of\", \"exactly_one_filled\", \"format_of\", \"inclusion_of\", \"numeric_nil\", \"required\", \"uniqueness_of\"] of ::String %}\n when :validate_{{ val.id }}\n Rosetta.find(\"avram.validate_{{ val.id }}\").t\n {% end %}\n else\n raise \"Avram translation missing for '#{key}'\"\n end\n {% end %}\n\n \nend\n \nend\n \n"}}]},{"html_id":"Rosetta/Rosetta/Parser","path":"Rosetta/Parser.html","kind":"class","full_name":"Rosetta::Parser","name":"Parser","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/Rosetta/Parser/Checks","kind":"module","full_name":"Rosetta::Parser::Checks","name":"Checks"},{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/parser.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L11"},{"filename":"src/rosetta/parser/builder.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/builder.cr#L2"},{"filename":"src/rosetta/parser/checks.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/checks.cr#L2"},{"filename":"src/rosetta/parser/config.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"Rosetta/Rosetta/Parser/Checks","kind":"module","full_name":"Rosetta::Parser::Checks","name":"Checks"}],"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"constructors":[{"html_id":"new(config:Config)-class-method","name":"new","abstract":false,"args":[{"name":"config","external_name":"config","restriction":"Config"}],"args_string":"(config : Config)","args_html":"(config : Config)","location":{"filename":"src/rosetta/parser.cr","line_number":28,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L28"},"def":{"name":"new","args":[{"name":"config","external_name":"config","restriction":"Config"}],"visibility":"Public","body":"_ = allocate\n_.initialize(config)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"alternative_locales:Array(String)-instance-method","name":"alternative_locales","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":19,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L19"},"def":{"name":"alternative_locales","return_type":"Array(String)","visibility":"Public","body":"@alternative_locales"}},{"html_id":"available_locales(*args,**options)-instance-method","name":"available_locales","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":14,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L14"},"def":{"name":"available_locales","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.available_locales(*args, **options)"}},{"html_id":"available_locales(*args,**options,&)-instance-method","name":"available_locales","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":14,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L14"},"def":{"name":"available_locales","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.available_locales(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"config:Config-instance-method","name":"config","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":20,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L20"},"def":{"name":"config","return_type":"Config","visibility":"Public","body":"@config"}},{"html_id":"default_locale(*args,**options)-instance-method","name":"default_locale","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":15,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L15"},"def":{"name":"default_locale","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.default_locale(*args, **options)"}},{"html_id":"default_locale(*args,**options,&)-instance-method","name":"default_locale","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":15,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L15"},"def":{"name":"default_locale","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.default_locale(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"error:String|Nil-instance-method","name":"error","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":21,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L21"},"def":{"name":"error","return_type":"String | ::Nil","visibility":"Public","body":"@error"}},{"html_id":"fallback_rules(*args,**options)-instance-method","name":"fallback_rules","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":16,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L16"},"def":{"name":"fallback_rules","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.fallback_rules(*args, **options)"}},{"html_id":"fallback_rules(*args,**options,&)-instance-method","name":"fallback_rules","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":16,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L16"},"def":{"name":"fallback_rules","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.fallback_rules(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"parse!:String-instance-method","name":"parse!","doc":"Returns a list of self-containing translation modules.","summary":"

Returns a list of self-containing translation modules.

","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":39,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L39"},"def":{"name":"parse!","return_type":"String","visibility":"Public","body":"builder = Builder.new(default_locale)\nif translations.empty?\n return builder.build_locales(translations)\nend\nif valid_key_set?\nelse\n return error.to_s\nend\nbuilder.build_locales(processed_translations)\n"}},{"html_id":"path(*args,**options)-instance-method","name":"path","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":17,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L17"},"def":{"name":"path","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.path(*args, **options)"}},{"html_id":"path(*args,**options,&)-instance-method","name":"path","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":17,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L17"},"def":{"name":"path","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.path(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"pluralization_tags:Hash(String,Array(String))-instance-method","name":"pluralization_tags","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":22,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L22"},"def":{"name":"pluralization_tags","return_type":"Hash(String, Array(String))","visibility":"Public","body":"@pluralization_tags"}},{"html_id":"ruling_key_set:Array(String)-instance-method","name":"ruling_key_set","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":23,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L23"},"def":{"name":"ruling_key_set","return_type":"Array(String)","visibility":"Public","body":"@ruling_key_set"}},{"html_id":"translations:TranslationsHash-instance-method","name":"translations","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":24,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L24"},"def":{"name":"translations","return_type":"TranslationsHash","visibility":"Public","body":"@translations"}}],"types":[{"html_id":"Rosetta/Rosetta/Parser/Builder","path":"Rosetta/Parser/Builder.html","kind":"class","full_name":"Rosetta::Parser::Builder","name":"Builder","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/parser/builder.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/builder.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"},"constructors":[{"html_id":"new(default_locale:String)-class-method","name":"new","abstract":false,"args":[{"name":"default_locale","external_name":"default_locale","restriction":"String"}],"args_string":"(default_locale : String)","args_html":"(default_locale : String)","location":{"filename":"src/rosetta/parser/builder.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/builder.cr#L6"},"def":{"name":"new","args":[{"name":"default_locale","external_name":"default_locale","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(default_locale)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"build_locales(translations:TranslationsHash)-instance-method","name":"build_locales","doc":"Builds the wrapping module for all translation structs.","summary":"

Builds the wrapping module for all translation structs.

","abstract":false,"args":[{"name":"translations","external_name":"translations","restriction":"TranslationsHash"}],"args_string":"(translations : TranslationsHash)","args_html":"(translations : TranslationsHash)","location":{"filename":"src/rosetta/parser/builder.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/builder.cr#L10"},"def":{"name":"build_locales","args":[{"name":"translations","external_name":"translations","restriction":"TranslationsHash"}],"visibility":"Public","body":"\"module Rosetta\\n module Locales\\n#{(build_structs(translations)).join(\"\\n\")}\\n end\\nend\""}},{"html_id":"default_locale:String-instance-method","name":"default_locale","abstract":false,"location":{"filename":"src/rosetta/parser/builder.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/builder.cr#L4"},"def":{"name":"default_locale","visibility":"Public","body":"@default_locale"}}]},{"html_id":"Rosetta/Rosetta/Parser/Checks","path":"Rosetta/Parser/Checks.html","kind":"module","full_name":"Rosetta::Parser::Checks","name":"Checks","abstract":false,"locations":[{"filename":"src/rosetta/parser/checks.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/checks.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"}],"namespace":{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"}},{"html_id":"Rosetta/Rosetta/Parser/Config","path":"Rosetta/Parser/Config.html","kind":"class","full_name":"Rosetta::Parser::Config","name":"Config","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/YAML/Serializable","kind":"module","full_name":"YAML::Serializable","name":"Serializable"},{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/parser/config.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"Rosetta/YAML/Serializable","kind":"module","full_name":"YAML::Serializable","name":"Serializable"}],"namespace":{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"},"constructors":[{"html_id":"new(ctx:YAML::ParseContext,node:YAML::Nodes::Node)-class-method","name":"new","abstract":false,"args":[{"name":"ctx","external_name":"ctx","restriction":"YAML::ParseContext"},{"name":"node","external_name":"node","restriction":"YAML::Nodes::Node"}],"args_string":"(ctx : YAML::ParseContext, node : YAML::Nodes::Node)","args_html":"(ctx : YAML::ParseContext, node : YAML::Nodes::Node)","location":{"filename":"src/rosetta/parser/config.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L4"},"def":{"name":"new","args":[{"name":"ctx","external_name":"ctx","restriction":"YAML::ParseContext"},{"name":"node","external_name":"node","restriction":"YAML::Nodes::Node"}],"visibility":"Public","body":"new_from_yaml_node(ctx, node)"}}],"instance_methods":[{"html_id":"available_locales:Array(String)-instance-method","name":"available_locales","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L8"},"def":{"name":"available_locales","return_type":"Array(String)","visibility":"Public","body":"@available_locales"}},{"html_id":"default_locale:String-instance-method","name":"default_locale","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":7,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L7"},"def":{"name":"default_locale","return_type":"String","visibility":"Public","body":"@default_locale"}},{"html_id":"fallback_rules:Hash(String,String)|Nil-instance-method","name":"fallback_rules","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L9"},"def":{"name":"fallback_rules","return_type":"Hash(String, String) | ::Nil","visibility":"Public","body":"@fallback_rules"}},{"html_id":"path:String-instance-method","name":"path","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L6"},"def":{"name":"path","return_type":"String","visibility":"Public","body":"@path"}},{"html_id":"pluralization_rules:Hash(String,String)-instance-method","name":"pluralization_rules","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L10"},"def":{"name":"pluralization_rules","return_type":"Hash(String, String)","visibility":"Public","body":"@pluralization_rules"}},{"html_id":"pluralization_tags:Hash(String,Array(String))-instance-method","name":"pluralization_tags","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser/config.cr#L11"},"def":{"name":"pluralization_tags","return_type":"Hash(String, Array(String))","visibility":"Public","body":"@pluralization_tags"}}]}]},{"html_id":"Rosetta/Rosetta/Pluralization","path":"Rosetta/Pluralization.html","kind":"module","full_name":"Rosetta::Pluralization","name":"Pluralization","abstract":false,"locations":[{"filename":"src/rosetta/pluralization.cr","line_number":161,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization.cr#L161"},{"filename":"src/rosetta/pluralization/rule.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule.cr#L2"},{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/arabic.cr#L2"},{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/breton.cr#L2"},{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L2"},{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/colognian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/east_slavic.cr#L2"},{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/irish.cr#L2"},{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/langi.cr#L2"},{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/latvian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/lithuanian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/macedonian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/maltese.cr#L2"},{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/manx.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_two_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_with_zero_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/polish.cr#L2"},{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/romanian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/scottish_gaelic.cr#L2"},{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/slovenian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/upper_sorbian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/welsh.cr#L2"},{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/west_slavic.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"types":[{"html_id":"Rosetta/Rosetta/Pluralization/CategoryTags","path":"Rosetta/Pluralization/CategoryTags.html","kind":"annotation","full_name":"Rosetta::Pluralization::CategoryTags","name":"CategoryTags","abstract":false,"locations":[{"filename":"src/rosetta/pluralization/rule.cr","line_number":16,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule.cr#L16"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization","kind":"module","full_name":"Rosetta::Pluralization","name":"Pluralization"},"doc":"Define required category tags using this annotation.","summary":"

Define required category tags using this annotation.

"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule","path":"Rosetta/Pluralization/Rule.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule","abstract":true,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule.cr#L11"},{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/arabic.cr#L3"},{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/breton.cr#L3"},{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L3"},{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/colognian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/east_slavic.cr#L3"},{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/irish.cr#L3"},{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/langi.cr#L3"},{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/latvian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/lithuanian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/macedonian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/maltese.cr#L3"},{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/manx.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_two_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_with_zero_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/polish.cr#L3"},{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/romanian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/scottish_gaelic.cr#L3"},{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/slovenian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/upper_sorbian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/welsh.cr#L3"},{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/west_slavic.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Arabic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Arabic","name":"Arabic"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Breton","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Breton","name":"Breton"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/CentralMoroccoTamazight","kind":"struct","full_name":"Rosetta::Pluralization::Rule::CentralMoroccoTamazight","name":"CentralMoroccoTamazight"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Colognian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Colognian","name":"Colognian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/EastSlavic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::EastSlavic","name":"EastSlavic"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Irish","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Irish","name":"Irish"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Langi","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Langi","name":"Langi"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Latvian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Latvian","name":"Latvian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Lithuanian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Lithuanian","name":"Lithuanian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Macedonian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Macedonian","name":"Macedonian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Maltese","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Maltese","name":"Maltese"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Manx","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Manx","name":"Manx"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneOther","name":"OneOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneTwoOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneTwoOther","name":"OneTwoOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneUpToTwoOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneUpToTwoOther","name":"OneUpToTwoOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneWithZeroOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneWithZeroOther","name":"OneWithZeroOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Other","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Other","name":"Other"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Polish","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Polish","name":"Polish"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Romanian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Romanian","name":"Romanian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/ScottishGaelic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::ScottishGaelic","name":"ScottishGaelic"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Slovenian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Slovenian","name":"Slovenian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/UpperSorbian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::UpperSorbian","name":"UpperSorbian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Welsh","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Welsh","name":"Welsh"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/WestSlavic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::WestSlavic","name":"WestSlavic"}],"namespace":{"html_id":"Rosetta/Rosetta/Pluralization","kind":"module","full_name":"Rosetta::Pluralization","name":"Pluralization"},"doc":"Abstract pluralization rule.\n\nA pluralization rule struct provides a main `#rule` method that, given a\n`count` number, returns the corresponding plural category tag, which\nshould be part of the common plural category tags defined\n[by the CLDR](http://cldr.unicode.org/index/cldr-spec/plural-rules):\n\n`:zero`, `:one`, `:two`, `:few`, `:many` and `:other`.","summary":"

Abstract pluralization rule.

","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/rosetta/pluralization/rule.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule.cr#L11"},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":true,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule.cr","line_number":12,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule.cr#L12"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":""}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/rosetta/pluralization/rule.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule.cr#L11"},"def":{"name":"initialize","visibility":"Public","body":""}}],"types":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Arabic","path":"Rosetta/Pluralization/Rule/Arabic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Arabic","name":"Arabic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/arabic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Arabic pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Arabic pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/arabic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif count == 0\n :zero\nelse\n if count == 1\n :one\n else\n if count == 2\n :two\n else\n if FROM_3_TO_10.includes?(mod100)\n :few\n else\n if FROM_11_TO_99.includes?(mod100)\n :many\n else\n :other\n end\n end\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Breton","path":"Rosetta/Pluralization/Rule/Breton.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Breton","name":"Breton","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/breton.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Breton pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Breton pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/breton.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif (mod10 == 1) && (!([11, 71, 91].includes?(mod100)))\n :one\nelse\n if (mod10 == 2) && (!([12, 72, 92].includes?(mod100)))\n :two\n else\n if ([3, 4, 9].includes?(mod10)) && (!((((10..19).to_a + (70..79).to_a) + (90..99).to_a).includes?(mod100)))\n :few\n else\n if ((count % 1000000) == 0) && (count != 0)\n :many\n else\n :other\n end\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/CentralMoroccoTamazight","path":"Rosetta/Pluralization/Rule/CentralMoroccoTamazight.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::CentralMoroccoTamazight","name":"CentralMoroccoTamazight","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Central Morocco Tamazight pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Central Morocco Tamazight pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ([0, 1] + (11..99).to_a).includes?(count)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Colognian","path":"Rosetta/Pluralization/Rule/Colognian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Colognian","name":"Colognian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/colognian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Colognian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Colognian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/colognian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 0\n :zero\nelse\n if count == 1\n :one\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/EastSlavic","path":"Rosetta/Pluralization/Rule/EastSlavic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::EastSlavic","name":"EastSlavic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/east_slavic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Belarusian, Bosnian, Croatian, Russian, Serbian, Serbo-Croatian, Ukrainian.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Belarusian, Bosnian, Croatian, Russian, Serbian, Serbo-Croatian, Ukrainian.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/east_slavic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif (mod10 == 1) && (mod100 != 11)\n :one\nelse\n if (FROM_2_TO_4.includes?(mod10)) && (!(FROM_12_TO_14.includes?(mod100)))\n :few\n else\n if ((mod10 == 0) || (FROM_5_TO_9.includes?(mod10))) || (FROM_11_TO_14.includes?(mod100))\n :many\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Irish","path":"Rosetta/Pluralization/Rule/Irish.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Irish","name":"Irish","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/irish.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Irish pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Irish pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/irish.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if count == 2\n :two\n else\n if FROM_3_TO_6.includes?(count)\n :few\n else\n if FROM_7_TO_10.includes?(count)\n :many\n else\n :other\n end\n end\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Langi","path":"Rosetta/Pluralization/Rule/Langi.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Langi","name":"Langi","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/langi.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Langi pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Langi pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/langi.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 0\n :zero\nelse\n if count > 0 && count < 2\n :one\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Latvian","path":"Rosetta/Pluralization/Rule/Latvian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Latvian","name":"Latvian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/latvian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Latvian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Latvian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/latvian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ((count % 10) == 1) && ((count % 100) != 11)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Lithuanian","path":"Rosetta/Pluralization/Rule/Lithuanian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Lithuanian","name":"Lithuanian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/lithuanian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Lithuanian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Lithuanian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/lithuanian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif (mod10 == 1) && (!(FROM_11_TO_19.includes?(mod100)))\n :one\nelse\n if (FROM_2_TO_9.includes?(mod10)) && (!(FROM_11_TO_19.includes?(mod100)))\n :few\n else\n :other\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Macedonian","path":"Rosetta/Pluralization/Rule/Macedonian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Macedonian","name":"Macedonian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/macedonian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Macedonian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Macedonian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/macedonian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ((count % 10) == 1) && (count != 11)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Maltese","path":"Rosetta/Pluralization/Rule/Maltese.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Maltese","name":"Maltese","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/maltese.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Maltese pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Maltese pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/maltese.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif count == 1\n :one\nelse\n if (count == 0) || (FROM_2_TO_10.includes?(mod100))\n :few\n else\n if FROM_11_TO_19.includes?(mod100)\n :many\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Manx","path":"Rosetta/Pluralization/Rule/Manx.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Manx","name":"Manx","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/manx.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Manx pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Manx pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/manx.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ([1, 2].includes?(count % 10)) || ((count % 20) == 0)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneOther","path":"Rosetta/Pluralization/Rule/OneOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneOther","name":"OneOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_other.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"The default pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

The default pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_other.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"count == 1 ? :one : :other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneTwoOther","path":"Rosetta/Pluralization/Rule/OneTwoOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneTwoOther","name":"OneTwoOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_two_other.cr#L9"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Cornish, Inari Sami, Inuktitut, Lule Sami, Nama, Northern Sami, Sami Language,\nSkolt Sami, Southern Sami.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Cornish, Inari Sami, Inuktitut, Lule Sami, Nama, Northern Sami, Sami Language, Skolt Sami, Southern Sami.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_two_other.cr#L10"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if count == 2\n :two\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneUpToTwoOther","path":"Rosetta/Pluralization/Rule/OneUpToTwoOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneUpToTwoOther","name":"OneUpToTwoOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: French, Fulah, Kabyle.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: French, Fulah, Kabyle.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"count >= 0 && count < 2 ? :one : :other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneWithZeroOther","path":"Rosetta/Pluralization/Rule/OneWithZeroOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneWithZeroOther","name":"OneWithZeroOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_with_zero_other.cr#L9"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Akan, Amharic, Bihari, Filipino, guw, Hindi, Lingala, Malagasy, Northen Sotho,\nTachelhit, Tagalog, Tigrinya, Walloon.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Akan, Amharic, Bihari, Filipino, guw, Hindi, Lingala, Malagasy, Northen Sotho, Tachelhit, Tagalog, Tigrinya, Walloon.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/one_with_zero_other.cr#L10"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"(count == 0) || (count == 1) ? :one : :other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Other","path":"Rosetta/Pluralization/Rule/Other.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Other","name":"Other","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/other.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"A rule that only returns the \"other\" pluralization category.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

A rule that only returns the "other" pluralization category.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/other.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":":other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Polish","path":"Rosetta/Pluralization/Rule/Polish.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Polish","name":"Polish","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/polish.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Polish pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Polish pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/polish.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif count == 1\n :one\nelse\n if ([2, 3, 4].includes?(mod10)) && (!([12, 13, 14].includes?(mod100)))\n :few\n else\n if (([0, 1] + (5..9).to_a).includes?(mod10)) || ([12, 13, 14].includes?(mod100))\n :many\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Romanian","path":"Rosetta/Pluralization/Rule/Romanian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Romanian","name":"Romanian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/romanian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Romanian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Romanian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/romanian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if (count == 0) || ((1..19).to_a.includes?(count % 100))\n :few\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/ScottishGaelic","path":"Rosetta/Pluralization/Rule/ScottishGaelic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::ScottishGaelic","name":"ScottishGaelic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/scottish_gaelic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Scottish gaelic pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Scottish gaelic pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/scottish_gaelic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if (count == 1) || (count == 11)\n :one\nelse\n if (count == 2) || (count == 12)\n :two\n else\n if (FROM_3_TO_10 + FROM_13_TO_19).includes?(count)\n :few\n else\n :other\n end\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Slovenian","path":"Rosetta/Pluralization/Rule/Slovenian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Slovenian","name":"Slovenian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/slovenian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Slovenian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Slovenian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/slovenian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif mod100 == 1\n :one\nelse\n if mod100 == 2\n :two\n else\n if (mod100 == 3) || (mod100 == 4)\n :few\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/UpperSorbian","path":"Rosetta/Pluralization/Rule/UpperSorbian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::UpperSorbian","name":"UpperSorbian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/upper_sorbian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Upper sorbian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Upper sorbian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/upper_sorbian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif mod100 == 1\n :one\nelse\n if mod100 == 2\n :two\n else\n if (mod100 == 3) || (mod100 == 4)\n :few\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Welsh","path":"Rosetta/Pluralization/Rule/Welsh.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Welsh","name":"Welsh","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/welsh.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Welsh pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Welsh pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/welsh.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"case count\nwhen 0\n :zero\nwhen 1\n :one\nwhen 2\n :two\nwhen 3\n :few\nwhen 6\n :many\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/WestSlavic","path":"Rosetta/Pluralization/Rule/WestSlavic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::WestSlavic","name":"WestSlavic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/west_slavic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Czech, Slovak.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Czech, Slovak.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/pluralization/rule/west_slavic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if FROM_2_TO_4.includes?(count)\n :few\n else\n :other\n end\nend"}}]}]}]},{"html_id":"Rosetta/Rosetta/PluralizationRules","path":"Rosetta/PluralizationRules.html","kind":"annotation","full_name":"Rosetta::PluralizationRules","name":"PluralizationRules","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":5,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/annotations.cr#L5"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/PluralizedTranslation","path":"Rosetta/PluralizedTranslation.html","kind":"module","full_name":"Rosetta::PluralizedTranslation","name":"PluralizedTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":85,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L85"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations with pluralizable values.","summary":"

Methods for translations with pluralizable values.

","instance_methods":[{"html_id":"t_hash(values:Hash)-instance-method","name":"t_hash","doc":"Using a hash for interpolation is considered unsafe since the content of\nhashes can't be checked at compile-time. Try to avoid using this method if\nyou can.","summary":"

Using a hash for interpolation is considered unsafe since the content of hashes can't be checked at compile-time.

","abstract":false,"args":[{"name":"values","external_name":"values","restriction":"Hash"}],"args_string":"(values : Hash)","args_html":"(values : Hash)","location":{"filename":"src/rosetta/translation.cr","line_number":89,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L89"},"def":{"name":"t_hash","args":[{"name":"values","external_name":"values","restriction":"Hash"}],"visibility":"Public","body":"if count = values[\"count\"]?\nelse\n message = \"Missing \\\"count\\\" from interpolation values\"\n raise(InterpolationArgumentException.new(message))\nend\nRosetta.interpolate(Rosetta.pluralize(count.to_s.to_i, raw), values)\n"}}]},{"html_id":"Rosetta/Rosetta/SimpleTranslation","path":"Rosetta/SimpleTranslation.html","kind":"module","full_name":"Rosetta::SimpleTranslation","name":"SimpleTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":60,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L60"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations without interpolations.","summary":"

Methods for translations without interpolations.

","instance_methods":[{"html_id":"t-instance-method","name":"t","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":61,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L61"},"def":{"name":"t","visibility":"Public","body":"raw"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/rosetta/translation.cr","line_number":69,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L69"},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io.puts(raw)"}},{"html_id":"to_s-instance-method","name":"to_s","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":65,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L65"},"def":{"name":"to_s","visibility":"Public","body":"raw"}}]},{"html_id":"Rosetta/Rosetta/Translatable","path":"Rosetta/Translatable.html","kind":"module","full_name":"Rosetta::Translatable","name":"Translatable","abstract":false,"locations":[{"filename":"src/rosetta/translatable.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translatable.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Include this module in any class where you need to translate many keys.","summary":"

Include this module in any class where you need to translate many keys.

","macros":[{"html_id":"r(key)-macro","name":"r","doc":"Finds the translation for the given key. If the given key starts with a\n\".\", a prefix based on the current class name will be used. Unless a\n`Rosetta::Translatable::Config` annotation is defined with a value for\n`prefix`, which will then be used instead.\n\n@[Rosetta::Translatable::Config(prefix: \"user\")]\nclass Person\n include Rosetta::Translatable\n\n def greeting\n r(\".welcome_message\").t # => key resolves to \"user.welcome_message\"\n end\nend","summary":"

Finds the translation for the given key.

","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""}],"args_string":"(key)","args_html":"(key)","location":{"filename":"src/rosetta/translatable.cr","line_number":17,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translatable.cr#L17"},"def":{"name":"r","args":[{"name":"key","external_name":"key","restriction":""}],"visibility":"Public","body":" \n{% if key.is_a?(StringLiteral) %}\n {% if key.starts_with?('.')\n config = @type.annotation(Rosetta::Translatable::Config)\n if config && config[:prefix]\n key = \"#{config[:prefix].id}#{key.id}\"\n else\n inferred_key = (@type.id.underscore.gsub(/::|\\(/, \".\")).gsub(/\\)/, \"\")\n key = \"#{inferred_key.id}#{key.id}\"\n end\nend %}\n\n Rosetta.find({{ key }})\n {% else %}\n {% raise(\"Only a StringLiteral can be used as a locale key.\\n\\n Use case to dynamically switch between locale keys. For example:\\n\\n case value\\n when \\\"one\\\"\\n r(\\\"key.option.one\\\").t\\n when \\\"two\\\"\\n r(\\\"key.option.two\\\").t\\n else\\n r(\\\"key.option.fallback\\\").t\\n end\\n\\n\") %}\n {% end %}\n\n \n"}}],"types":[{"html_id":"Rosetta/Rosetta/Translatable/Config","path":"Rosetta/Translatable/Config.html","kind":"annotation","full_name":"Rosetta::Translatable::Config","name":"Config","abstract":false,"locations":[{"filename":"src/rosetta/translatable.cr","line_number":56,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translatable.cr#L56"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Translatable","kind":"module","full_name":"Rosetta::Translatable","name":"Translatable"}}]},{"html_id":"Rosetta/Rosetta/Translation","path":"Rosetta/Translation.html","kind":"struct","full_name":"Rosetta::Translation","name":"Translation","abstract":true,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/translation.cr","line_number":50,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L50"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Base struct for translation values.","summary":"

Base struct for translation values.

","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":50,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L50"},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":50,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L50"},"def":{"name":"initialize","visibility":"Public","body":""}},{"html_id":"raw-instance-method","name":"raw","doc":"Return the raw translation value for the current locale.","summary":"

Return the raw translation value for the current locale.

","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":54,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L54"},"def":{"name":"raw","visibility":"Public","body":"translations[Rosetta.locale]"}},{"html_id":"translations-instance-method","name":"translations","abstract":true,"location":{"filename":"src/rosetta/translation.cr","line_number":51,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L51"},"def":{"name":"translations","visibility":"Public","body":""}}]},{"html_id":"Rosetta/Rosetta/Translations","path":"Rosetta/Translations.html","kind":"alias","full_name":"Rosetta::Translations","name":"Translations","abstract":false,"locations":[{"filename":"src/rosetta/parser.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Hash(String, String) | String)","aliased_html":"Hash(String, Hash(String, String) | String)","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/TranslationsHash","path":"Rosetta/TranslationsHash.html","kind":"alias","full_name":"Rosetta::TranslationsHash","name":"TranslationsHash","abstract":false,"locations":[{"filename":"src/rosetta/parser.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/parser.cr#L9"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Hash(String, Hash(String, String) | String))","aliased_html":"Hash(String, Hash(String, Hash(String, String) | String))","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/VariantsTranslation","path":"Rosetta/VariantsTranslation.html","kind":"module","full_name":"Rosetta::VariantsTranslation","name":"VariantsTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":100,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L100"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations with variants.","summary":"

Methods for translations with variants.

","instance_methods":[{"html_id":"t_hash(values:Hash)-instance-method","name":"t_hash","doc":"Using a hash for interpolation is considered unsafe since the content of\nhashes can't be checked at compile-time. Try to avoid using this method if\nyou can.","summary":"

Using a hash for interpolation is considered unsafe since the content of hashes can't be checked at compile-time.

","abstract":false,"args":[{"name":"values","external_name":"values","restriction":"Hash"}],"args_string":"(values : Hash)","args_html":"(values : Hash)","location":{"filename":"src/rosetta/translation.cr","line_number":104,"url":"https://github.com/wout/rosetta/blob/4a7386c2/src/rosetta/translation.cr#L104"},"def":{"name":"t_hash","args":[{"name":"values","external_name":"values","restriction":"Hash"}],"visibility":"Public","body":"if variant = values[\"variant\"]?\nelse\n message = \"Missing \\\"variant\\\" from interpolation values\"\n raise(InterpolationArgumentException.new(message))\nend\nRosetta.interpolate(raw[variant], values)\n"}}]}]}]}}) \ No newline at end of file +crystal_doc_search_index_callback({"repository_name":"Rosetta","body":"# Rosetta\n\n

\n \"Rosetta\n

\n\nA blazing fast internationalization (i18n) library for Crystal with compile-time\nkey lookup. You'll never have a `missing translation` in your app, ever again.\n\n![GitHub](https://img.shields.io/github/license/wout/rosetta)\n![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/wout/rosetta)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/wout/rosetta/ci.yml?branch=main)\n\n## Why use Rosetta?\n\n### You'll never have a missing translation\n\nRosetta is different from other internationalization libraries because it\nhandles key lookup at compile-time rather than runtime. The significant\nadvantage is that you'll be able to find missing translations - or typos in\nyour locale keys - during development rather than after you've deployed your\napp. This is also true for translation keys in all additional locales.\n\n### You'll never have a missing interpolation\n\nIn Rosetta, interpolation keys are arguments to the translation method. So if\nyou're missing an argument, the compiler will complain. The parser will also\ncompare interpolation keys in additional locales to the ones found in the\ndefault locale, and complain if some are missing.\n\n### Rosetta is more than 12x faster than similar libraries\n\nBenchmarking against other libraries which also use YAML or JSON backends,\nRosetta is 12x to 700x faster than any other one.\n\nFor simple translations:\n\n```\ncrimson-knight/i18n.cr translation 303.57k ( 3.29µs) (± 4.62%) 801B/op 702.21× slower\n crystal-i18n/i18n translation 18.07M ( 55.35ns) (± 7.28%) 48.0B/op 12.39× slower\n syeopite/lens translation 5.09M (196.47ns) (± 4.60%) 176B/op 43.98× slower\n wout/rosetta translation 223.86M ( 4.47ns) (± 2.20%) 0.0B/op fastest\n```\n\nFor translations with interpolations:\n\n```\ncrimson-knight/i18n.cr interpolation 318.12k ( 3.14µs) (± 0.85%) 801B/op 108.51× slower\n crystal-i18n/i18n interpolation 65.55k ( 15.26µs) (± 1.01%) 28.2kB/op 664.37× slower\n syeopite/lens interpolation 2.04M (490.17ns) (± 1.35%) 565B/op 21.35× slower\n wout/rosetta interpolation 43.55M ( 22.96ns) (± 4.81%) 80.0B/op fastest\n```\n\nRosetta is that much faster because a lot of the hard work happens at\ncompile-time. And because the majority of the data is stored on the [stack\nrather than the\nheap](https://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap),\nout of the scope of garbage collector.\n\nRead more on [the official docs page](https://wout.github.io/rosetta/latest).\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n```yaml\ndependencies:\n rosetta:\n github: wout/rosetta\n```\n\n2. Run `shards install`\n\n3. Run `bin/rosetta --init`\n\n4. Require the generated config file:\n\n```cr\n# src/app_name.cr\nrequire \"../config/rosetta\"\n```\n\n5. Include the `Rosetta::Translatable` mixin:\n\n```cr\n# src/pages/main_layout.cr\ninclude Rosetta::Translatable\n```\n\n6. Localize your app\n\n```cr\nRosetta.locale = :es\n\nclass Hello::ShowPage < MainLayout\n def content\n h1 r(\"welcome_message\").t(name: \"Brian\") # => \"¡Hola Brian!\"\n end\nend\n```\n\nRead more on [the official docs page](https://wout.github.io/rosetta/latest).\n\n## Development\n\nMake sure you have [Guardian.cr](https://github.com/f/guardian) installed. Then\nrun:\n\n```bash\n$ guardian\n```\n\nThis will automatically:\n\n- run ameba for src and spec files\n- run the relevant spec for any file in src\n- run spec file whenever they are saved\n- install shards whenever you save shard.yml\n\n## Documentation\n\n- [Reference](https://wout.github.io/rosetta/latest)\n- [API Docs](https://wout.github.io/rosetta/api/main)\n\n## Contributing\n\n### To the lib\n\n1. Fork it ()\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n### To the docs\n\nCheck out the `docs` branch and run the following command to launch the docs locally:\n\n```\ndocker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material\n```\n\n## Contributors\n\n- [wout](https://github.com/wout) - creator and maintainer\n\n## Acknowledgements\n\nThis shard pulls inspiration from the following projects:\n\n- [crimson-knight/i18n.cr](https://github.com/crimson-knight/i18n.cr)\n- [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n)\n- [syeopite/lens](https://github.com/syeopite/lens)\n- [Rails](https://github.com/rails/rails)\n","program":{"html_id":"Rosetta/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"locations":[],"repository_name":"Rosetta","program":true,"enum":false,"alias":false,"const":false,"types":[{"html_id":"Rosetta/Rosetta","path":"Rosetta.html","kind":"module","full_name":"Rosetta","name":"Rosetta","abstract":false,"locations":[{"filename":"src/rosetta/aliases.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/aliases.cr#L1"},{"filename":"src/rosetta/annotations.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/annotations.cr#L1"},{"filename":"src/rosetta/backend.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/backend.cr#L1"},{"filename":"src/rosetta/config.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/config.cr#L1"},{"filename":"src/rosetta/configuration.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/configuration.cr#L4"},{"filename":"src/rosetta/interpolation.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/interpolation.cr#L1"},{"filename":"src/rosetta/localizable.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L1"},{"filename":"src/rosetta/localization.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L1"},{"filename":"src/rosetta/lucky/integration.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/lucky/integration.cr#L1"},{"filename":"src/rosetta/parser.cr","line_number":7,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L7"},{"filename":"src/rosetta/parser/builder.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/builder.cr#L1"},{"filename":"src/rosetta/parser/checks.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/checks.cr#L1"},{"filename":"src/rosetta/parser/config.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L1"},{"filename":"src/rosetta/pluralization.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization.cr#L1"},{"filename":"src/rosetta/pluralization/rule.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule.cr#L1"},{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/arabic.cr#L1"},{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/breton.cr#L1"},{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L1"},{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/colognian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/east_slavic.cr#L1"},{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/irish.cr#L1"},{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/langi.cr#L1"},{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/latvian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/lithuanian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/macedonian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/maltese.cr#L1"},{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/manx.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_two_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_with_zero_other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/other.cr#L1"},{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/polish.cr#L1"},{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/romanian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/scottish_gaelic.cr#L1"},{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/slovenian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/upper_sorbian.cr#L1"},{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/welsh.cr#L1"},{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/west_slavic.cr#L1"},{"filename":"src/rosetta/translatable.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translatable.cr#L1"},{"filename":"src/rosetta/translation.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L1"},{"filename":"src/rosetta/version.cr","line_number":1,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/version.cr#L1"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"VERSION","name":"VERSION","value":"{{ (`shards version \\\"/home/runner/work/rosetta/rosetta/src/rosetta\\\"`).chomp.stringify }}"}],"class_methods":[{"html_id":"distance_of_time_in_words(from:Time,to:Time):String-class-method","name":"distance_of_time_in_words","doc":"Returns a `String` with approximate distance in time between `from` and\n`to`. For example:\n\n```\nRosetta.distance_of_time_in_words(\n Time.utc(2021, 10, 15, 8, 0, 0),\n Time.utc(2021, 10, 15, 8, 0, 5))\n)\n# => \"5 seconds\"\n```\n\nMost of the code for this method is borrowed from Lucky.","summary":"

Returns a String with approximate distance in time between from and to.

","abstract":false,"args":[{"name":"from","external_name":"from","restriction":"Time"},{"name":"to","external_name":"to","restriction":"Time"}],"args_string":"(from : Time, to : Time) : String","args_html":"(from : Time, to : Time) : String","location":{"filename":"src/rosetta/localization.cr","line_number":77,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L77"},"def":{"name":"distance_of_time_in_words","args":[{"name":"from","external_name":"from","restriction":"Time"},{"name":"to","external_name":"to","restriction":"Time"}],"return_type":"String","visibility":"Public","body":"minutes = (to - from).minutes\nseconds = (to - from).seconds\nhours = (to - from).hours\ndays = (to - from).days\nif days != 0\n return distance_in_days(days)\nend\nif hours != 0\n return distance_in_hours(hours)\nend\nif minutes != 0\n return distance_in_minutes(minutes)\nend\ndistance_in_seconds(seconds)\n"}},{"html_id":"interpolate(translation:String,values:Hash|NamedTuple)-class-method","name":"interpolate","doc":"Interpolates a given string with the values from the given hash or named\ntuple.","summary":"

Interpolates a given string with the values from the given hash or named tuple.

","abstract":false,"args":[{"name":"translation","external_name":"translation","restriction":"String"},{"name":"values","external_name":"values","restriction":"Hash | NamedTuple"}],"args_string":"(translation : String, values : Hash | NamedTuple)","args_html":"(translation : String, values : Hash | NamedTuple)","location":{"filename":"src/rosetta/interpolation.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/interpolation.cr#L4"},"def":{"name":"interpolate","args":[{"name":"translation","external_name":"translation","restriction":"String"},{"name":"values","external_name":"values","restriction":"Hash | NamedTuple"}],"visibility":"Public","body":"values.each do |key, value|\n translation = if value.is_a?(Time)\n localize_time(value, translation)\n else\n if value.is_a?(Tuple(Int32, Int32, Int32))\n localize_time(Time.local(*value), translation)\n else\n translation.gsub(/\\%\\{#{key}\\}/, value)\n end\n end\nend\ntranslation\n"}},{"html_id":"locale:String-class-method","name":"locale","doc":"Gets the current locale at runtime using the config instance stored in the\ncurrent fiber.","summary":"

Gets the current locale at runtime using the config instance stored in the current fiber.

","abstract":false,"location":{"filename":"src/rosetta/configuration.cr","line_number":24,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/configuration.cr#L24"},"def":{"name":"locale","return_type":"String","visibility":"Public","body":"config.locale"}},{"html_id":"locale=(locale:String|Symbol)-class-method","name":"locale=","doc":"Sets the current locale at runtime using the config instance stored in the\ncurrent fiber.","summary":"

Sets the current locale at runtime using the config instance stored in the current fiber.

","abstract":false,"args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"args_string":"(locale : String | Symbol)","args_html":"(locale : String | Symbol)","location":{"filename":"src/rosetta/configuration.cr","line_number":18,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/configuration.cr#L18"},"def":{"name":"locale=","args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"visibility":"Public","body":"config.locale = locale"}},{"html_id":"localize_time(time:Time,format:String)-class-method","name":"localize_time","doc":"Uses a given format to localize a given Time object, for example:\n\n```\nRosetta.localize_time(Time.local, \"%d %b %Y %H:%M:%S\")\n```","summary":"

Uses a given format to localize a given Time object, for example:

","abstract":false,"args":[{"name":"time","external_name":"time","restriction":"Time"},{"name":"format","external_name":"format","restriction":"String"}],"args_string":"(time : Time, format : String)","args_html":"(time : Time, format : String)","location":{"filename":"src/rosetta/localization.cr","line_number":63,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L63"},"def":{"name":"localize_time","args":[{"name":"time","external_name":"time","restriction":"Time"},{"name":"format","external_name":"format","restriction":"String"}],"visibility":"Public","body":"time.to_s(localize_day_and_month_names(time, format))"}},{"html_id":"localize_time(time:Tuple(Int32,Int32,Int32),format:String)-class-method","name":"localize_time","abstract":false,"args":[{"name":"time","external_name":"time","restriction":"Tuple(Int32, Int32, Int32)"},{"name":"format","external_name":"format","restriction":"String"}],"args_string":"(time : Tuple(Int32, Int32, Int32), format : String)","args_html":"(time : Tuple(Int32, Int32, Int32), format : String)","location":{"filename":"src/rosetta/localization.cr","line_number":70,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L70"},"def":{"name":"localize_time","args":[{"name":"time","external_name":"time","restriction":"Tuple(Int32, Int32, Int32)"},{"name":"format","external_name":"format","restriction":"String"}],"visibility":"Public","body":"localize_time(Time.local(*time), format)"}},{"html_id":"pluralize(count:Rosetta::CountArg,translation:NamedTuple,rule:Pluralization::Rule=Pluralization::RULES[Rosetta.locale].new)-class-method","name":"pluralize","doc":"Pluralizes a given pluralizable translation.","summary":"

Pluralizes a given pluralizable translation.

","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"},{"name":"translation","external_name":"translation","restriction":"NamedTuple"},{"name":"rule","default_value":"Pluralization::RULES[Rosetta.locale].new","external_name":"rule","restriction":"Pluralization::Rule"}],"args_string":"(count : Rosetta::CountArg, translation : NamedTuple, rule : Pluralization::Rule = Pluralization::RULES[Rosetta.locale].new)","args_html":"(count : Rosetta::CountArg, translation : NamedTuple, rule : Pluralization::Rule = Pluralization::RULES[Rosetta.locale].new)","location":{"filename":"src/rosetta/pluralization.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization.cr#L3"},"def":{"name":"pluralize","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"},{"name":"translation","external_name":"translation","restriction":"NamedTuple"},{"name":"rule","default_value":"Pluralization::RULES[Rosetta.locale].new","external_name":"rule","restriction":"Pluralization::Rule"}],"visibility":"Public","body":"if (count == 0) && translation[:zero]?\n return translation[:zero]?.to_s\nend\ntranslation[rule.apply(count)]\n"}},{"html_id":"time_ago_in_words(from:Time):String-class-method","name":"time_ago_in_words","doc":"Returns a `String` with approximate distance in time between `from` and\ncurrent moment.\n\n```\ntime_ago_in_words(Time.utc(2019, 8, 30))\n# => \"about a month\"\n# gives the same result as:\ndistance_of_time_in_words(Time.utc(2019, 8, 30), Time.utc)\n# => \"about a month\"\n```\n\nSee more examples in `#distance_of_time_in_words`.","summary":"

Returns a String with approximate distance in time between from and current moment.

","abstract":false,"args":[{"name":"from","external_name":"from","restriction":"Time"}],"args_string":"(from : Time) : String","args_html":"(from : Time) : String","location":{"filename":"src/rosetta/localization.cr","line_number":77,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L77"},"def":{"name":"time_ago_in_words","args":[{"name":"from","external_name":"from","restriction":"Time"}],"return_type":"String","visibility":"Public","body":"distance_of_time_in_words(from, Time.utc)"}},{"html_id":"time_from_now_in_words(to:Time):String-class-method","name":"time_from_now_in_words","doc":"Returns a `String` with approximate distance in time between current\nmoment and future date.\n\n```\ntime_from_now_in_words(Time.utc(2022, 8, 30))\n# => \"about a year\"\n# gives the same result as:\ndistance_of_time_in_words(Time.utc, Time.utc(2022, 8, 30))\n# => \"about a year\"\n```\n\nSee more examples in `#distance_of_time_in_words`.","summary":"

Returns a String with approximate distance in time between current moment and future date.

","abstract":false,"args":[{"name":"to","external_name":"to","restriction":"Time"}],"args_string":"(to : Time) : String","args_html":"(to : Time) : String","location":{"filename":"src/rosetta/localization.cr","line_number":77,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L77"},"def":{"name":"time_from_now_in_words","args":[{"name":"to","external_name":"to","restriction":"Time"}],"return_type":"String","visibility":"Public","body":"distance_of_time_in_words(Time.utc, to)"}},{"html_id":"with_locale(locale:String|Symbol,&)-class-method","name":"with_locale","doc":"Temporarily use a different locale.","summary":"

Temporarily use a different locale.

","abstract":false,"args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"args_string":"(locale : String | Symbol, &)","args_html":"(locale : String | Symbol, &)","location":{"filename":"src/rosetta/translation.cr","line_number":41,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L41"},"def":{"name":"with_locale","args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"yields":0,"block_arity":0,"visibility":"Public","body":"begin\n current_locale = Rosetta.locale\n Rosetta.locale = locale\n yield\nensure\n Rosetta.locale = current_locale || default_locale\nend"}}],"macros":[{"html_id":"available_locales-macro","name":"available_locales","doc":"Fetches the available locales from the corresponding annotation.","summary":"

Fetches the available locales from the corresponding annotation.

","abstract":false,"location":{"filename":"src/rosetta/configuration.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/configuration.cr#L11"},"def":{"name":"available_locales","visibility":"Public","body":" \n{% locales = (@type.annotation(Rosetta::AvailableLocales)).args %}\n\n [\n{{ locales.map() do |__arg0|\n __arg0.id.stringify\nend.splat }}\n]\n \n"}},{"html_id":"date(format=:default)-macro","name":"date","doc":"Localizes a date, for example:\n\n```\nRosetta.date.t(Time.local)\nRosetta.date.t({2021, 8, 20})\nRosetta.date(:long).l(Time.local)\nRosetta.date(\"%a, %d %b %Y\").l(Time.local.date)\n```","summary":"

Localizes a date, for example:

","abstract":false,"args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"args_string":"(format = :default)","args_html":"(format = :default)","location":{"filename":"src/rosetta/localization.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L10"},"def":{"name":"date","args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"visibility":"Public","body":" \n{% if format.is_a?(SymbolLiteral) %}\n format = Rosetta.find(\"rosetta_localization.date.formats.{{ format.id }}\")\n {% else %}\n format = {{ format }}\n {% end %}\n\n\n Rosetta::LocalizedTime.new(format)\n \n"}},{"html_id":"default_locale-macro","name":"default_locale","doc":"Fetches the default locale from the corresponding annotation.","summary":"

Fetches the default locale from the corresponding annotation.

","abstract":false,"location":{"filename":"src/rosetta/configuration.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/configuration.cr#L6"},"def":{"name":"default_locale","visibility":"Public","body":" \n{{ (@type.annotation(Rosetta::DefaultLocale)).args.first.id.stringify }}\n\n \n"}},{"html_id":"find(key)-macro","name":"find","doc":"Finds the translations for the given key as a dedicated class instance for\nthe translation, which inherits from `Rosetta::Translation`.\n\nIf the key does not exist, a compile error will be raised.","summary":"

Finds the translations for the given key as a dedicated class instance for the translation, which inherits from Rosetta::Translation.

","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""}],"args_string":"(key)","args_html":"(key)","location":{"filename":"src/rosetta/translation.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L6"},"def":{"name":"find","args":[{"name":"key","external_name":"key","restriction":""}],"visibility":"Public","body":" \n{% if key.is_a?(StringLiteral) %}\n {% class_name_from_key = (key.split('.')).map(&.camelcase).join('_')\ntranslation_class_name = \"#{class_name_from_key.id}Translation\".id\n %}\n\n {% if Rosetta::Locales.has_constant?(translation_class_name) %}\n Rosetta::Locales::{{ translation_class_name.id }}.new\n {% else %}\n {% raise(\"Missing translation for #{key} in all locales\") %}\n {% end %}\n {% else %}\n {% raise(\"Only a StringLiteral can be used as a locale key.\\n\\n Use case to dynamically switch between locale keys. For example:\\n\\n case value\\n when \\\"one\\\"\\n Rosetta.find(\\\"key.option.one\\\").t\\n when \\\"two\\\"\\n Rosetta.find(\\\"key.option.two\\\").t\\n else\\n Rosetta.find(\\\"key.option.fallback\\\").t\\n end\\n\\n\") %}\n {% end %}\n\n \n"}},{"html_id":"number(format=:default)-macro","name":"number","doc":"Localizes a numeric value, for example:\n\n```\nRosetta.number.t(123_456.789)\nRosetta.number(:custom).l(123_456.789)\n```","summary":"

Localizes a numeric value, for example:

","abstract":false,"args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"args_string":"(format = :default)","args_html":"(format = :default)","location":{"filename":"src/rosetta/localization.cr","line_number":43,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L43"},"def":{"name":"number","args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"visibility":"Public","body":" \n{% namespace = \"Rosetta::Locales::RosettaLocalization_Number_Formats\".id\nprefix = \"#{namespace}_#{format.id.camelcase}\".id\n %}\n\n\n Rosetta::LocalizedNumber.new(\n separator: \n{{ prefix }}\n_SeparatorTranslation.new.to_s,\n delimiter: \n{{ prefix }}\n_DelimiterTranslation.new.to_s,\n decimal_places: \n{{ prefix }}\n_DecimalPlacesTranslation.new.to_s.to_i,\n group: \n{{ prefix }}\n_GroupTranslation.new.to_s.to_i,\n only_significant: \n{{ prefix }}\n_OnlySignificantTranslation.new.to_s == \"true\"\n )\n \n"}},{"html_id":"time(format=:default)-macro","name":"time","doc":"Localizes time, for example:\n\n```\nRosetta.time.t(Time.local)\nRosetta.time(:short).l(Time.local)\nRosetta.time(\"%d %b %Y %H:%M:%S\").l(Time.local)\n```","summary":"

Localizes time, for example:

","abstract":false,"args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"args_string":"(format = :default)","args_html":"(format = :default)","location":{"filename":"src/rosetta/localization.cr","line_number":27,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L27"},"def":{"name":"time","args":[{"name":"format","default_value":":default","external_name":"format","restriction":""}],"visibility":"Public","body":" \n{% if format.is_a?(SymbolLiteral) %}\n format = Rosetta.find(\"rosetta_localization.time.formats.{{ format.id }}\")\n {% else %}\n format = {{ format }}\n {% end %}\n\n\n Rosetta::LocalizedTime.new(format)\n \n"}}],"types":[{"html_id":"Rosetta/Rosetta/AvailableLocales","path":"Rosetta/AvailableLocales.html","kind":"annotation","full_name":"Rosetta::AvailableLocales","name":"AvailableLocales","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/annotations.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/Backend","path":"Rosetta/Backend.html","kind":"module","full_name":"Rosetta::Backend","name":"Backend","abstract":false,"locations":[{"filename":"src/rosetta/backend.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/backend.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"macros":[{"html_id":"load(path)-macro","name":"load","doc":"Loads the parsed set of locales from the given path. This macro should be\ncalled in an initializer:\n\n```\nRosetta::Backend.load(\"config/locales\")\n```","summary":"

Loads the parsed set of locales from the given path.

","abstract":false,"args":[{"name":"path","external_name":"path","restriction":""}],"args_string":"(path)","args_html":"(path)","location":{"filename":"src/rosetta/backend.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/backend.cr#L9"},"def":{"name":"load","args":[{"name":"path","external_name":"path","restriction":""}],"visibility":"Public","body":" \n{% anno = Rosetta.annotation(Rosetta::DefaultLocale)\nif anno.nil? || (default_locale = anno.args.first).nil?\n raise(\"\\n No default locale is defined. Add an annotation with exactly one value:\\n\\n + @[Rosetta::DefaultLocale(:en)]\\n @[Rosetta::AvailableLocales(:en, :fr, :nl)]\\n module Rosetta\\n end\\n\")\nend\n %}\n\n\n \n{% anno = Rosetta.annotation(Rosetta::AvailableLocales)\nif anno.nil? || (available_locales = anno.args).empty?\n raise(\"\\n No available locales defined. Add an annotation with at least one value:\\n\\n @[Rosetta::DefaultLocale(:en)]\\n + @[Rosetta::AvailableLocales(:en, :fr, :nl)]\\n module Rosetta\\n end\\n\")\nend\n %}\n\n\n \n{% fallback_rules = [] of ::String\nanno = Rosetta.annotation(Rosetta::FallbackRules)\nif anno && (rules = anno.args.first)\n rules.each do |locale, fallback|\n fallback_rules.push(\" #{locale.id}: #{fallback.id}\")\n end\nend\n %}\n\n\n \n{% rules = (Rosetta::Pluralization.annotation(Rosetta::DefaultPluralizationRules)).args.first\nanno = Rosetta.annotation(Rosetta::PluralizationRules)\nif anno && (custom_rules = anno.args.first)\n custom_rules.each do |locale, rule|\n rules[locale] = rule\n end\nend\n %}\n\n\n Rosetta::Pluralization::RULES = \n{{ rules }}\n\n\n \n{% pluralization_rules = [] of String\npluralization_tags = [] of String\navailable_locales.each do |locale|\n rule = rules[locale] || rules[(locale.split(\"-\")).first]\n unless rule\n raise(\"No pluralization rule is defined for \\\"#{locale.id}\\\"\")\n end\n rule = rule.resolve\n anno = rule.annotation(Rosetta::Pluralization::CategoryTags)\n if anno\n pluralization_tags.push(\" #{rule}: [#{(anno.args.join(',')).id}]\")\n else\n raise(\"#{rule} is missing a CategoryTags annotation\")\n end\n pluralization_rules.push(\" #{locale.id}: #{rule}\")\nend\n %}\n\n\n \n{% yaml = \"path: #{path.id}\\ndefault_locale: #{default_locale.id}\\navailable_locales: [#{(available_locales.join(',')).id}]\\nfallback_rules:\\n#{(fallback_rules.join(\"\\n\")).id}\\npluralization_rules:\\n#{(pluralization_rules.join(\"\\n\")).id}\\npluralization_tags:\\n#{(pluralization_tags.uniq.join(\"\\n\")).id}\"\ntranslations = run(\"./runner\", yaml)\nif !(translations.stringify.starts_with?(\"module Rosetta\"))\n raise(translations.stringify)\nend\n %}\n\n\n \n{{ translations }}\n\n \n"}}]},{"html_id":"Rosetta/Rosetta/Config","path":"Rosetta/Config.html","kind":"class","full_name":"Rosetta::Config","name":"Config","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/config.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/config.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"instance_methods":[{"html_id":"locale:String-instance-method","name":"locale","doc":"Gets the current locale or falls back to the default locale if it's not\ndefined.","summary":"

Gets the current locale or falls back to the default locale if it's not defined.

","abstract":false,"location":{"filename":"src/rosetta/config.cr","line_number":18,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/config.cr#L18"},"def":{"name":"locale","return_type":"String","visibility":"Public","body":"(@locale || Rosetta.default_locale)"}},{"html_id":"locale=(locale:String|Symbol)-instance-method","name":"locale=","doc":"Sets the current locale with the given value, if it's found in the\navailable locales.","summary":"

Sets the current locale with the given value, if it's found in the available locales.

","abstract":false,"args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"args_string":"(locale : String | Symbol)","args_html":"(locale : String | Symbol)","location":{"filename":"src/rosetta/config.cr","line_number":7,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/config.cr#L7"},"def":{"name":"locale=","args":[{"name":"locale","external_name":"locale","restriction":"String | Symbol"}],"visibility":"Public","body":"@locale = if Rosetta.available_locales.map(&.to_s).includes?(locale.to_s)\n locale.to_s\nelse\n Rosetta.default_locale\nend"}}]},{"html_id":"Rosetta/Rosetta/CountArg","path":"Rosetta/CountArg.html","kind":"alias","full_name":"Rosetta::CountArg","name":"CountArg","abstract":false,"locations":[{"filename":"src/rosetta/aliases.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/aliases.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"(Float64 | Int32 | Int64)","aliased_html":"Float64 | Int32 | Int64","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/DefaultLocale","path":"Rosetta/DefaultLocale.html","kind":"annotation","full_name":"Rosetta::DefaultLocale","name":"DefaultLocale","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/annotations.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/DefaultPluralizationRules","path":"Rosetta/DefaultPluralizationRules.html","kind":"annotation","full_name":"Rosetta::DefaultPluralizationRules","name":"DefaultPluralizationRules","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/annotations.cr#L6"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/FallbackRules","path":"Rosetta/FallbackRules.html","kind":"annotation","full_name":"Rosetta::FallbackRules","name":"FallbackRules","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/annotations.cr#L4"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/Fallbacks","path":"Rosetta/Fallbacks.html","kind":"alias","full_name":"Rosetta::Fallbacks","name":"Fallbacks","abstract":false,"locations":[{"filename":"src/rosetta/aliases.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/aliases.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"(Array(String) | Hash(String, Array(String) | String) | Nil)","aliased_html":"Array(String) | Hash(String, Array(String) | String) | Nil","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/InterpolatedTranslation","path":"Rosetta/InterpolatedTranslation.html","kind":"module","full_name":"Rosetta::InterpolatedTranslation","name":"InterpolatedTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":75,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L75"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations with interpolations.","summary":"

Methods for translations with interpolations.

","instance_methods":[{"html_id":"t_hash(values:Hash)-instance-method","name":"t_hash","doc":"Using a hash for interpolation is considered unsafe since the content of\nhashes can't be checked at compile-time. Try to avoid using this method if\nyou can.","summary":"

Using a hash for interpolation is considered unsafe since the content of hashes can't be checked at compile-time.

","abstract":false,"args":[{"name":"values","external_name":"values","restriction":"Hash"}],"args_string":"(values : Hash)","args_html":"(values : Hash)","location":{"filename":"src/rosetta/translation.cr","line_number":79,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L79"},"def":{"name":"t_hash","args":[{"name":"values","external_name":"values","restriction":"Hash"}],"visibility":"Public","body":"Rosetta.interpolate(raw, values)"}}]},{"html_id":"Rosetta/Rosetta/InterpolationArgumentException","path":"Rosetta/InterpolationArgumentException.html","kind":"class","full_name":"Rosetta::InterpolationArgumentException","name":"InterpolationArgumentException","abstract":false,"superclass":{"html_id":"Rosetta/Exception","kind":"class","full_name":"Exception","name":"Exception"},"ancestors":[{"html_id":"Rosetta/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/interpolation.cr","line_number":21,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/interpolation.cr#L21"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/Localizable","path":"Rosetta/Localizable.html","kind":"module","full_name":"Rosetta::Localizable","name":"Localizable","abstract":false,"locations":[{"filename":"src/rosetta/localizable.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Include this module in any class where you need to localize many values.","summary":"

Include this module in any class where you need to localize many values.

","instance_methods":[{"html_id":"distance_of_time_in_words(*args,**options)-instance-method","name":"distance_of_time_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/localizable.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L4"},"def":{"name":"distance_of_time_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"Rosetta.distance_of_time_in_words(*args, **options)"}},{"html_id":"distance_of_time_in_words(*args,**options,&)-instance-method","name":"distance_of_time_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/localizable.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L4"},"def":{"name":"distance_of_time_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"Rosetta.distance_of_time_in_words(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"time_ago_in_words(*args,**options)-instance-method","name":"time_ago_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/localizable.cr","line_number":5,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L5"},"def":{"name":"time_ago_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"Rosetta.time_ago_in_words(*args, **options)"}},{"html_id":"time_ago_in_words(*args,**options,&)-instance-method","name":"time_ago_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/localizable.cr","line_number":5,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L5"},"def":{"name":"time_ago_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"Rosetta.time_ago_in_words(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"time_from_now_in_words(*args,**options)-instance-method","name":"time_from_now_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/localizable.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L6"},"def":{"name":"time_from_now_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"Rosetta.time_from_now_in_words(*args, **options)"}},{"html_id":"time_from_now_in_words(*args,**options,&)-instance-method","name":"time_from_now_in_words","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/localizable.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L6"},"def":{"name":"time_from_now_in_words","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"Rosetta.time_from_now_in_words(*args, **options) do |*yield_args|\n yield *yield_args\nend"}}],"macros":[{"html_id":"r_date(format)-macro","name":"r_date","doc":"Finds the translations for a given format to localize a date","summary":"

Finds the translations for a given format to localize a date

","abstract":false,"args":[{"name":"format","external_name":"format","restriction":""}],"args_string":"(format)","args_html":"(format)","location":{"filename":"src/rosetta/localizable.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L9"},"def":{"name":"r_date","args":[{"name":"format","external_name":"format","restriction":""}],"visibility":"Public","body":" Rosetta.date(\n{{ format }}\n)\n \n"}},{"html_id":"r_number(format)-macro","name":"r_number","doc":"Finds the translations for a given format to localize a number","summary":"

Finds the translations for a given format to localize a number

","abstract":false,"args":[{"name":"format","external_name":"format","restriction":""}],"args_string":"(format)","args_html":"(format)","location":{"filename":"src/rosetta/localizable.cr","line_number":19,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L19"},"def":{"name":"r_number","args":[{"name":"format","external_name":"format","restriction":""}],"visibility":"Public","body":" Rosetta.number(\n{{ format }}\n)\n \n"}},{"html_id":"r_time(format)-macro","name":"r_time","doc":"Finds the translations for a given format to localize a time","summary":"

Finds the translations for a given format to localize a time

","abstract":false,"args":[{"name":"format","external_name":"format","restriction":""}],"args_string":"(format)","args_html":"(format)","location":{"filename":"src/rosetta/localizable.cr","line_number":14,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localizable.cr#L14"},"def":{"name":"r_time","args":[{"name":"format","external_name":"format","restriction":""}],"visibility":"Public","body":" Rosetta.time(\n{{ format }}\n)\n \n"}}]},{"html_id":"Rosetta/Rosetta/LocalizedNumber","path":"Rosetta/LocalizedNumber.html","kind":"struct","full_name":"Rosetta::LocalizedNumber","name":"LocalizedNumber","abstract":false,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/localization.cr","line_number":288,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L288"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"LocalizedNumber is similar to a Translation object; it implements a similar\ninterface but its sole purpose is to localize numeric objects.","summary":"

LocalizedNumber is similar to a Translation object; it implements a similar interface but its sole purpose is to localize numeric objects.

","constructors":[{"html_id":"new(separator:String|Char,delimiter:String|Char,decimal_places:Int32,group:Int32,only_significant:Bool)-class-method","name":"new","abstract":false,"args":[{"name":"separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","external_name":"group","restriction":"Int32"},{"name":"only_significant","external_name":"only_significant","restriction":"Bool"}],"args_string":"(separator : String | Char, delimiter : String | Char, decimal_places : Int32, group : Int32, only_significant : Bool)","args_html":"(separator : String | Char, delimiter : String | Char, decimal_places : Int32, group : Int32, only_significant : Bool)","location":{"filename":"src/rosetta/localization.cr","line_number":289,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L289"},"def":{"name":"new","args":[{"name":"separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","external_name":"group","restriction":"Int32"},{"name":"only_significant","external_name":"only_significant","restriction":"Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(separator, delimiter, decimal_places, group, only_significant)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"l(number:Number,separator:String|Char=@separator,delimiter:String|Char=@delimiter,decimal_places:Int32=@decimal_places,group:Int32=@group,only_significant:Bool=@only_significant)-instance-method","name":"l","abstract":false,"args":[{"name":"number","external_name":"number","restriction":"Number"},{"name":"separator","default_value":"@separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","default_value":"@delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","default_value":"@decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","default_value":"@group","external_name":"group","restriction":"Int32"},{"name":"only_significant","default_value":"@only_significant","external_name":"only_significant","restriction":"Bool"}],"args_string":"(number : Number, separator : String | Char = @separator, delimiter : String | Char = @delimiter, decimal_places : Int32 = @decimal_places, group : Int32 = @group, only_significant : Bool = @only_significant)","args_html":"(number : Number, separator : String | Char = @separator, delimiter : String | Char = @delimiter, decimal_places : Int32 = @decimal_places, group : Int32 = @group, only_significant : Bool = @only_significant)","location":{"filename":"src/rosetta/localization.cr","line_number":298,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L298"},"def":{"name":"l","args":[{"name":"number","external_name":"number","restriction":"Number"},{"name":"separator","default_value":"@separator","external_name":"separator","restriction":"String | Char"},{"name":"delimiter","default_value":"@delimiter","external_name":"delimiter","restriction":"String | Char"},{"name":"decimal_places","default_value":"@decimal_places","external_name":"decimal_places","restriction":"Int32"},{"name":"group","default_value":"@group","external_name":"group","restriction":"Int32"},{"name":"only_significant","default_value":"@only_significant","external_name":"only_significant","restriction":"Bool"}],"visibility":"Public","body":"number.format(separator: separator, delimiter: delimiter, decimal_places: decimal_places, group: group, only_significant: only_significant)"}}]},{"html_id":"Rosetta/Rosetta/LocalizedTime","path":"Rosetta/LocalizedTime.html","kind":"struct","full_name":"Rosetta::LocalizedTime","name":"LocalizedTime","abstract":false,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/localization.cr","line_number":267,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L267"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"LocalizedTime is similar to a Translation object; it implements a similar\ninterface but its sole purpose is to localize time objects.","summary":"

LocalizedTime is similar to a Translation object; it implements a similar interface but its sole purpose is to localize time objects.

","constructors":[{"html_id":"new(format:String)-class-method","name":"new","abstract":false,"args":[{"name":"format","external_name":"format","restriction":"String"}],"args_string":"(format : String)","args_html":"(format : String)","location":{"filename":"src/rosetta/localization.cr","line_number":274,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L274"},"def":{"name":"new","args":[{"name":"format","external_name":"format","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(format)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(translation:Translation)-class-method","name":"new","abstract":false,"args":[{"name":"translation","external_name":"translation","restriction":"Translation"}],"args_string":"(translation : Translation)","args_html":"(translation : Translation)","location":{"filename":"src/rosetta/localization.cr","line_number":270,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L270"},"def":{"name":"new","args":[{"name":"translation","external_name":"translation","restriction":"Translation"}],"visibility":"Public","body":"_ = allocate\n_.initialize(translation)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"format:String-instance-method","name":"format","abstract":false,"location":{"filename":"src/rosetta/localization.cr","line_number":268,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L268"},"def":{"name":"format","visibility":"Public","body":"@format"}},{"html_id":"l(time:Time)-instance-method","name":"l","abstract":false,"args":[{"name":"time","external_name":"time","restriction":"Time"}],"args_string":"(time : Time)","args_html":"(time : Time)","location":{"filename":"src/rosetta/localization.cr","line_number":277,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L277"},"def":{"name":"l","args":[{"name":"time","external_name":"time","restriction":"Time"}],"visibility":"Public","body":"Rosetta.localize_time(time, format)"}},{"html_id":"l(date:Tuple(Int32,Int32,Int32))-instance-method","name":"l","abstract":false,"args":[{"name":"date","external_name":"date","restriction":"Tuple(Int32, Int32, Int32)"}],"args_string":"(date : Tuple(Int32, Int32, Int32))","args_html":"(date : Tuple(Int32, Int32, Int32))","location":{"filename":"src/rosetta/localization.cr","line_number":281,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/localization.cr#L281"},"def":{"name":"l","args":[{"name":"date","external_name":"date","restriction":"Tuple(Int32, Int32, Int32)"}],"visibility":"Public","body":"Rosetta.localize_time(Time.local(*date), format)"}}]},{"html_id":"Rosetta/Rosetta/Lucky","path":"Rosetta/Lucky.html","kind":"module","full_name":"Rosetta::Lucky","name":"Lucky","abstract":false,"locations":[{"filename":"src/rosetta/lucky/integration.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/lucky/integration.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"macros":[{"html_id":"integrate-macro","name":"integrate","abstract":false,"location":{"filename":"src/rosetta/lucky/integration.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/lucky/integration.cr#L3"},"def":{"name":"integrate","visibility":"Public","body":" \n{% targets = {\"Avram::Model\", \"Avram::Operation\", \"Avram::DeleteOperation(T)\", \"Avram::SaveOperation(T)\", \"Lucky::Action\", \"Lucky::BaseComponent\"} %}\n\n\n \n{% for target in targets %}\n abstract class ::{{ target.id }}\n include Rosetta::Localizable\n include Rosetta::Translatable\n end\n {% end %}\n\n\n module ::Lucky::HTMLPage\n macro included\n include Rosetta::Localizable\n include Rosetta::Translatable\n \nend\n \nend\n\n module ::Lucky::AllowedInTags\n \nend\n\n module Rosetta::SimpleTranslation\n macro included\n include ::Lucky::AllowedInTags\n \nend\n \nend\n\n abstract struct ::Avram::I18nBackend; \nend\n\n struct Rosetta::AvramBackend < ::Avram::I18nBackend\n def get(key : String | Symbol) : String\n \n{% if true %}\n case key\n {% for val in [\"exact_size_of\", \"max_size_of\", \"min_size_of\", \"numeric_max\", \"numeric_min\"] of ::String %}\n when :validate_{{ val.id }}\n Rosetta.find(\"avram.validate_{{ val.id }}\").t(size: \"%d\")\n {% end %}\n {% for val in [\"acceptance_of\", \"at_most_one_filled\", \"confirmation_of\", \"exactly_one_filled\", \"format_of\", \"inclusion_of\", \"numeric_nil\", \"required\", \"uniqueness_of\"] of ::String %}\n when :validate_{{ val.id }}\n Rosetta.find(\"avram.validate_{{ val.id }}\").t\n {% end %}\n else\n raise \"Avram translation missing for '#{key}'\"\n end\n {% end %}\n\n \nend\n \nend\n \n"}}]},{"html_id":"Rosetta/Rosetta/Parser","path":"Rosetta/Parser.html","kind":"class","full_name":"Rosetta::Parser","name":"Parser","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/Rosetta/Parser/Checks","kind":"module","full_name":"Rosetta::Parser::Checks","name":"Checks"},{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/parser.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L11"},{"filename":"src/rosetta/parser/builder.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/builder.cr#L2"},{"filename":"src/rosetta/parser/checks.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/checks.cr#L2"},{"filename":"src/rosetta/parser/config.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"Rosetta/Rosetta/Parser/Checks","kind":"module","full_name":"Rosetta::Parser::Checks","name":"Checks"}],"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"constructors":[{"html_id":"new(config:Config)-class-method","name":"new","abstract":false,"args":[{"name":"config","external_name":"config","restriction":"Config"}],"args_string":"(config : Config)","args_html":"(config : Config)","location":{"filename":"src/rosetta/parser.cr","line_number":28,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L28"},"def":{"name":"new","args":[{"name":"config","external_name":"config","restriction":"Config"}],"visibility":"Public","body":"_ = allocate\n_.initialize(config)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"alternative_locales:Array(String)-instance-method","name":"alternative_locales","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":19,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L19"},"def":{"name":"alternative_locales","return_type":"Array(String)","visibility":"Public","body":"@alternative_locales"}},{"html_id":"available_locales(*args,**options)-instance-method","name":"available_locales","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":14,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L14"},"def":{"name":"available_locales","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.available_locales(*args, **options)"}},{"html_id":"available_locales(*args,**options,&)-instance-method","name":"available_locales","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":14,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L14"},"def":{"name":"available_locales","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.available_locales(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"config:Config-instance-method","name":"config","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":20,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L20"},"def":{"name":"config","return_type":"Config","visibility":"Public","body":"@config"}},{"html_id":"default_locale(*args,**options)-instance-method","name":"default_locale","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":15,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L15"},"def":{"name":"default_locale","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.default_locale(*args, **options)"}},{"html_id":"default_locale(*args,**options,&)-instance-method","name":"default_locale","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":15,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L15"},"def":{"name":"default_locale","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.default_locale(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"error:String|Nil-instance-method","name":"error","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":21,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L21"},"def":{"name":"error","return_type":"String | ::Nil","visibility":"Public","body":"@error"}},{"html_id":"fallback_rules(*args,**options)-instance-method","name":"fallback_rules","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":16,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L16"},"def":{"name":"fallback_rules","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.fallback_rules(*args, **options)"}},{"html_id":"fallback_rules(*args,**options,&)-instance-method","name":"fallback_rules","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":16,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L16"},"def":{"name":"fallback_rules","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.fallback_rules(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"parse!:String-instance-method","name":"parse!","doc":"Returns a list of self-containing translation modules.","summary":"

Returns a list of self-containing translation modules.

","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":39,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L39"},"def":{"name":"parse!","return_type":"String","visibility":"Public","body":"builder = Builder.new(default_locale)\nif translations.empty?\n return builder.build_locales(translations)\nend\nif valid_key_set?\nelse\n return error.to_s\nend\nbuilder.build_locales(processed_translations)\n"}},{"html_id":"path(*args,**options)-instance-method","name":"path","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/rosetta/parser.cr","line_number":17,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L17"},"def":{"name":"path","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"config.path(*args, **options)"}},{"html_id":"path(*args,**options,&)-instance-method","name":"path","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/rosetta/parser.cr","line_number":17,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L17"},"def":{"name":"path","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"config.path(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"pluralization_tags:Hash(String,Array(String))-instance-method","name":"pluralization_tags","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":22,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L22"},"def":{"name":"pluralization_tags","return_type":"Hash(String, Array(String))","visibility":"Public","body":"@pluralization_tags"}},{"html_id":"ruling_key_set:Array(String)-instance-method","name":"ruling_key_set","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":23,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L23"},"def":{"name":"ruling_key_set","return_type":"Array(String)","visibility":"Public","body":"@ruling_key_set"}},{"html_id":"translations:TranslationsHash-instance-method","name":"translations","abstract":false,"location":{"filename":"src/rosetta/parser.cr","line_number":24,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L24"},"def":{"name":"translations","return_type":"TranslationsHash","visibility":"Public","body":"@translations"}}],"types":[{"html_id":"Rosetta/Rosetta/Parser/Builder","path":"Rosetta/Parser/Builder.html","kind":"class","full_name":"Rosetta::Parser::Builder","name":"Builder","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/parser/builder.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/builder.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"},"constructors":[{"html_id":"new(default_locale:String)-class-method","name":"new","abstract":false,"args":[{"name":"default_locale","external_name":"default_locale","restriction":"String"}],"args_string":"(default_locale : String)","args_html":"(default_locale : String)","location":{"filename":"src/rosetta/parser/builder.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/builder.cr#L6"},"def":{"name":"new","args":[{"name":"default_locale","external_name":"default_locale","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(default_locale)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"build_locales(translations:TranslationsHash)-instance-method","name":"build_locales","doc":"Builds the wrapping module for all translation structs.","summary":"

Builds the wrapping module for all translation structs.

","abstract":false,"args":[{"name":"translations","external_name":"translations","restriction":"TranslationsHash"}],"args_string":"(translations : TranslationsHash)","args_html":"(translations : TranslationsHash)","location":{"filename":"src/rosetta/parser/builder.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/builder.cr#L10"},"def":{"name":"build_locales","args":[{"name":"translations","external_name":"translations","restriction":"TranslationsHash"}],"visibility":"Public","body":"\"module Rosetta\\n module Locales\\n#{(build_structs(translations)).join(\"\\n\")}\\n end\\nend\""}},{"html_id":"default_locale:String-instance-method","name":"default_locale","abstract":false,"location":{"filename":"src/rosetta/parser/builder.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/builder.cr#L4"},"def":{"name":"default_locale","visibility":"Public","body":"@default_locale"}}]},{"html_id":"Rosetta/Rosetta/Parser/Checks","path":"Rosetta/Parser/Checks.html","kind":"module","full_name":"Rosetta::Parser::Checks","name":"Checks","abstract":false,"locations":[{"filename":"src/rosetta/parser/checks.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/checks.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"}],"namespace":{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"}},{"html_id":"Rosetta/Rosetta/Parser/Config","path":"Rosetta/Parser/Config.html","kind":"class","full_name":"Rosetta::Parser::Config","name":"Config","abstract":false,"superclass":{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"Rosetta/YAML/Serializable","kind":"module","full_name":"YAML::Serializable","name":"Serializable"},{"html_id":"Rosetta/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/parser/config.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"Rosetta/YAML/Serializable","kind":"module","full_name":"YAML::Serializable","name":"Serializable"}],"namespace":{"html_id":"Rosetta/Rosetta/Parser","kind":"class","full_name":"Rosetta::Parser","name":"Parser"},"constructors":[{"html_id":"new(ctx:YAML::ParseContext,node:YAML::Nodes::Node)-class-method","name":"new","abstract":false,"args":[{"name":"ctx","external_name":"ctx","restriction":"YAML::ParseContext"},{"name":"node","external_name":"node","restriction":"YAML::Nodes::Node"}],"args_string":"(ctx : YAML::ParseContext, node : YAML::Nodes::Node)","args_html":"(ctx : YAML::ParseContext, node : YAML::Nodes::Node)","location":{"filename":"src/rosetta/parser/config.cr","line_number":4,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L4"},"def":{"name":"new","args":[{"name":"ctx","external_name":"ctx","restriction":"YAML::ParseContext"},{"name":"node","external_name":"node","restriction":"YAML::Nodes::Node"}],"visibility":"Public","body":"new_from_yaml_node(ctx, node)"}}],"instance_methods":[{"html_id":"available_locales:Array(String)-instance-method","name":"available_locales","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L8"},"def":{"name":"available_locales","return_type":"Array(String)","visibility":"Public","body":"@available_locales"}},{"html_id":"default_locale:String-instance-method","name":"default_locale","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":7,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L7"},"def":{"name":"default_locale","return_type":"String","visibility":"Public","body":"@default_locale"}},{"html_id":"fallback_rules:Hash(String,String)|Nil-instance-method","name":"fallback_rules","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L9"},"def":{"name":"fallback_rules","return_type":"Hash(String, String) | ::Nil","visibility":"Public","body":"@fallback_rules"}},{"html_id":"path:String-instance-method","name":"path","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":6,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L6"},"def":{"name":"path","return_type":"String","visibility":"Public","body":"@path"}},{"html_id":"pluralization_rules:Hash(String,String)-instance-method","name":"pluralization_rules","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L10"},"def":{"name":"pluralization_rules","return_type":"Hash(String, String)","visibility":"Public","body":"@pluralization_rules"}},{"html_id":"pluralization_tags:Hash(String,Array(String))-instance-method","name":"pluralization_tags","abstract":false,"location":{"filename":"src/rosetta/parser/config.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser/config.cr#L11"},"def":{"name":"pluralization_tags","return_type":"Hash(String, Array(String))","visibility":"Public","body":"@pluralization_tags"}}]}]},{"html_id":"Rosetta/Rosetta/Pluralization","path":"Rosetta/Pluralization.html","kind":"module","full_name":"Rosetta::Pluralization","name":"Pluralization","abstract":false,"locations":[{"filename":"src/rosetta/pluralization.cr","line_number":161,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization.cr#L161"},{"filename":"src/rosetta/pluralization/rule.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule.cr#L2"},{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/arabic.cr#L2"},{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/breton.cr#L2"},{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L2"},{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/colognian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/east_slavic.cr#L2"},{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/irish.cr#L2"},{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/langi.cr#L2"},{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/latvian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/lithuanian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/macedonian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/maltese.cr#L2"},{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/manx.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_two_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_with_zero_other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/other.cr#L2"},{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/polish.cr#L2"},{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/romanian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/scottish_gaelic.cr#L2"},{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/slovenian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/upper_sorbian.cr#L2"},{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/welsh.cr#L2"},{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":2,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/west_slavic.cr#L2"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"types":[{"html_id":"Rosetta/Rosetta/Pluralization/CategoryTags","path":"Rosetta/Pluralization/CategoryTags.html","kind":"annotation","full_name":"Rosetta::Pluralization::CategoryTags","name":"CategoryTags","abstract":false,"locations":[{"filename":"src/rosetta/pluralization/rule.cr","line_number":16,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule.cr#L16"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization","kind":"module","full_name":"Rosetta::Pluralization","name":"Pluralization"},"doc":"Define required category tags using this annotation.","summary":"

Define required category tags using this annotation.

"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule","path":"Rosetta/Pluralization/Rule.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule","abstract":true,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule.cr#L11"},{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/arabic.cr#L3"},{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/breton.cr#L3"},{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L3"},{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/colognian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/east_slavic.cr#L3"},{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/irish.cr#L3"},{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/langi.cr#L3"},{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/latvian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/lithuanian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/macedonian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/maltese.cr#L3"},{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/manx.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_two_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_with_zero_other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/other.cr#L3"},{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/polish.cr#L3"},{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/romanian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/scottish_gaelic.cr#L3"},{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/slovenian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/upper_sorbian.cr#L3"},{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/welsh.cr#L3"},{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/west_slavic.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Arabic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Arabic","name":"Arabic"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Breton","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Breton","name":"Breton"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/CentralMoroccoTamazight","kind":"struct","full_name":"Rosetta::Pluralization::Rule::CentralMoroccoTamazight","name":"CentralMoroccoTamazight"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Colognian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Colognian","name":"Colognian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/EastSlavic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::EastSlavic","name":"EastSlavic"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Irish","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Irish","name":"Irish"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Langi","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Langi","name":"Langi"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Latvian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Latvian","name":"Latvian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Lithuanian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Lithuanian","name":"Lithuanian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Macedonian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Macedonian","name":"Macedonian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Maltese","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Maltese","name":"Maltese"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Manx","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Manx","name":"Manx"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneOther","name":"OneOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneTwoOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneTwoOther","name":"OneTwoOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneUpToTwoOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneUpToTwoOther","name":"OneUpToTwoOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneWithZeroOther","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneWithZeroOther","name":"OneWithZeroOther"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Other","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Other","name":"Other"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Polish","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Polish","name":"Polish"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Romanian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Romanian","name":"Romanian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/ScottishGaelic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::ScottishGaelic","name":"ScottishGaelic"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Slovenian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Slovenian","name":"Slovenian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/UpperSorbian","kind":"struct","full_name":"Rosetta::Pluralization::Rule::UpperSorbian","name":"UpperSorbian"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Welsh","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Welsh","name":"Welsh"},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/WestSlavic","kind":"struct","full_name":"Rosetta::Pluralization::Rule::WestSlavic","name":"WestSlavic"}],"namespace":{"html_id":"Rosetta/Rosetta/Pluralization","kind":"module","full_name":"Rosetta::Pluralization","name":"Pluralization"},"doc":"Abstract pluralization rule.\n\nA pluralization rule struct provides a main `#rule` method that, given a\n`count` number, returns the corresponding plural category tag, which\nshould be part of the common plural category tags defined\n[by the CLDR](http://cldr.unicode.org/index/cldr-spec/plural-rules):\n\n`:zero`, `:one`, `:two`, `:few`, `:many` and `:other`.","summary":"

Abstract pluralization rule.

","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/rosetta/pluralization/rule.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule.cr#L11"},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":true,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule.cr","line_number":12,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule.cr#L12"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":""}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/rosetta/pluralization/rule.cr","line_number":11,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule.cr#L11"},"def":{"name":"initialize","visibility":"Public","body":""}}],"types":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Arabic","path":"Rosetta/Pluralization/Rule/Arabic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Arabic","name":"Arabic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/arabic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Arabic pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Arabic pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/arabic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/arabic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif count == 0\n :zero\nelse\n if count == 1\n :one\n else\n if count == 2\n :two\n else\n if FROM_3_TO_10.includes?(mod100)\n :few\n else\n if FROM_11_TO_99.includes?(mod100)\n :many\n else\n :other\n end\n end\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Breton","path":"Rosetta/Pluralization/Rule/Breton.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Breton","name":"Breton","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/breton.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Breton pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Breton pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/breton.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/breton.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif (mod10 == 1) && (!([11, 71, 91].includes?(mod100)))\n :one\nelse\n if (mod10 == 2) && (!([12, 72, 92].includes?(mod100)))\n :two\n else\n if ([3, 4, 9].includes?(mod10)) && (!((((10..19).to_a + (70..79).to_a) + (90..99).to_a).includes?(mod100)))\n :few\n else\n if ((count % 1000000) == 0) && (count != 0)\n :many\n else\n :other\n end\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/CentralMoroccoTamazight","path":"Rosetta/Pluralization/Rule/CentralMoroccoTamazight.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::CentralMoroccoTamazight","name":"CentralMoroccoTamazight","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Central Morocco Tamazight pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Central Morocco Tamazight pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/central_morocco_tamazight.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/central_morocco_tamazight.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ([0, 1] + (11..99).to_a).includes?(count)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Colognian","path":"Rosetta/Pluralization/Rule/Colognian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Colognian","name":"Colognian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/colognian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Colognian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Colognian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/colognian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/colognian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 0\n :zero\nelse\n if count == 1\n :one\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/EastSlavic","path":"Rosetta/Pluralization/Rule/EastSlavic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::EastSlavic","name":"EastSlavic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/east_slavic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Belarusian, Bosnian, Croatian, Russian, Serbian, Serbo-Croatian, Ukrainian.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Belarusian, Bosnian, Croatian, Russian, Serbian, Serbo-Croatian, Ukrainian.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/east_slavic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/east_slavic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif (mod10 == 1) && (mod100 != 11)\n :one\nelse\n if (FROM_2_TO_4.includes?(mod10)) && (!(FROM_12_TO_14.includes?(mod100)))\n :few\n else\n if ((mod10 == 0) || (FROM_5_TO_9.includes?(mod10))) || (FROM_11_TO_14.includes?(mod100))\n :many\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Irish","path":"Rosetta/Pluralization/Rule/Irish.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Irish","name":"Irish","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/irish.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Irish pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Irish pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/irish.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/irish.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if count == 2\n :two\n else\n if FROM_3_TO_6.includes?(count)\n :few\n else\n if FROM_7_TO_10.includes?(count)\n :many\n else\n :other\n end\n end\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Langi","path":"Rosetta/Pluralization/Rule/Langi.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Langi","name":"Langi","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/langi.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Langi pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Langi pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/langi.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/langi.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 0\n :zero\nelse\n if count > 0 && count < 2\n :one\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Latvian","path":"Rosetta/Pluralization/Rule/Latvian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Latvian","name":"Latvian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/latvian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Latvian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Latvian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/latvian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/latvian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ((count % 10) == 1) && ((count % 100) != 11)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Lithuanian","path":"Rosetta/Pluralization/Rule/Lithuanian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Lithuanian","name":"Lithuanian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/lithuanian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Lithuanian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Lithuanian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/lithuanian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/lithuanian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif (mod10 == 1) && (!(FROM_11_TO_19.includes?(mod100)))\n :one\nelse\n if (FROM_2_TO_9.includes?(mod10)) && (!(FROM_11_TO_19.includes?(mod100)))\n :few\n else\n :other\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Macedonian","path":"Rosetta/Pluralization/Rule/Macedonian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Macedonian","name":"Macedonian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/macedonian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Macedonian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Macedonian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/macedonian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/macedonian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ((count % 10) == 1) && (count != 11)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Maltese","path":"Rosetta/Pluralization/Rule/Maltese.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Maltese","name":"Maltese","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/maltese.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Maltese pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Maltese pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/maltese.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/maltese.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif count == 1\n :one\nelse\n if (count == 0) || (FROM_2_TO_10.includes?(mod100))\n :few\n else\n if FROM_11_TO_19.includes?(mod100)\n :many\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Manx","path":"Rosetta/Pluralization/Rule/Manx.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Manx","name":"Manx","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/manx.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Manx pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Manx pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/manx.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/manx.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if ([1, 2].includes?(count % 10)) || ((count % 20) == 0)\n :one\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneOther","path":"Rosetta/Pluralization/Rule/OneOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneOther","name":"OneOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_other.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"The default pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

The default pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_other.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"count == 1 ? :one : :other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneTwoOther","path":"Rosetta/Pluralization/Rule/OneTwoOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneTwoOther","name":"OneTwoOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_two_other.cr#L9"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Cornish, Inari Sami, Inuktitut, Lule Sami, Nama, Northern Sami, Sami Language,\nSkolt Sami, Southern Sami.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Cornish, Inari Sami, Inuktitut, Lule Sami, Nama, Northern Sami, Sami Language, Skolt Sami, Southern Sami.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_two_other.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_two_other.cr#L10"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if count == 2\n :two\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneUpToTwoOther","path":"Rosetta/Pluralization/Rule/OneUpToTwoOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneUpToTwoOther","name":"OneUpToTwoOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: French, Fulah, Kabyle.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: French, Fulah, Kabyle.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_up_to_two_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_up_to_two_other.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"count >= 0 && count < 2 ? :one : :other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/OneWithZeroOther","path":"Rosetta/Pluralization/Rule/OneWithZeroOther.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::OneWithZeroOther","name":"OneWithZeroOther","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_with_zero_other.cr#L9"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Akan, Amharic, Bihari, Filipino, guw, Hindi, Lingala, Malagasy, Northen Sotho,\nTachelhit, Tagalog, Tigrinya, Walloon.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Akan, Amharic, Bihari, Filipino, guw, Hindi, Lingala, Malagasy, Northen Sotho, Tachelhit, Tagalog, Tigrinya, Walloon.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/one_with_zero_other.cr","line_number":10,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/one_with_zero_other.cr#L10"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"(count == 0) || (count == 1) ? :one : :other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Other","path":"Rosetta/Pluralization/Rule/Other.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Other","name":"Other","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/other.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"A rule that only returns the \"other\" pluralization category.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

A rule that only returns the "other" pluralization category.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/other.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/other.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":":other"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Polish","path":"Rosetta/Pluralization/Rule/Polish.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Polish","name":"Polish","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/polish.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Polish pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Polish pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/polish.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/polish.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod10 = count % 10\nmod100 = count % 100\nif count == 1\n :one\nelse\n if ([2, 3, 4].includes?(mod10)) && (!([12, 13, 14].includes?(mod100)))\n :few\n else\n if (([0, 1] + (5..9).to_a).includes?(mod10)) || ([12, 13, 14].includes?(mod100))\n :many\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Romanian","path":"Rosetta/Pluralization/Rule/Romanian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Romanian","name":"Romanian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/romanian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Romanian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Romanian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/romanian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/romanian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if (count == 0) || ((1..19).to_a.includes?(count % 100))\n :few\n else\n :other\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/ScottishGaelic","path":"Rosetta/Pluralization/Rule/ScottishGaelic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::ScottishGaelic","name":"ScottishGaelic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/scottish_gaelic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Scottish gaelic pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Scottish gaelic pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/scottish_gaelic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/scottish_gaelic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if (count == 1) || (count == 11)\n :one\nelse\n if (count == 2) || (count == 12)\n :two\n else\n if (FROM_3_TO_10 + FROM_13_TO_19).includes?(count)\n :few\n else\n :other\n end\n end\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Slovenian","path":"Rosetta/Pluralization/Rule/Slovenian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Slovenian","name":"Slovenian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/slovenian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Slovenian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Slovenian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/slovenian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/slovenian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif mod100 == 1\n :one\nelse\n if mod100 == 2\n :two\n else\n if (mod100 == 3) || (mod100 == 4)\n :few\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/UpperSorbian","path":"Rosetta/Pluralization/Rule/UpperSorbian.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::UpperSorbian","name":"UpperSorbian","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/upper_sorbian.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Upper sorbian pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Upper sorbian pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/upper_sorbian.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/upper_sorbian.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"mod100 = count % 100\nif mod100 == 1\n :one\nelse\n if mod100 == 2\n :two\n else\n if (mod100 == 3) || (mod100 == 4)\n :few\n else\n :other\n end\n end\nend\n"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/Welsh","path":"Rosetta/Pluralization/Rule/Welsh.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::Welsh","name":"Welsh","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/welsh.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Welsh pluralization rule.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Welsh pluralization rule.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/welsh.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/welsh.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"case count\nwhen 0\n :zero\nwhen 1\n :one\nwhen 2\n :two\nwhen 3\n :few\nwhen 6\n :many\nelse\n :other\nend"}}]},{"html_id":"Rosetta/Rosetta/Pluralization/Rule/WestSlavic","path":"Rosetta/Pluralization/Rule/WestSlavic.html","kind":"struct","full_name":"Rosetta::Pluralization::Rule::WestSlavic","name":"WestSlavic","abstract":false,"superclass":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"ancestors":[{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/west_slavic.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Pluralization/Rule","kind":"struct","full_name":"Rosetta::Pluralization::Rule","name":"Rule"},"doc":"Pluralization rule used for: Czech, Slovak.\n\nThis rule was extracted from [crystal-i18n/i18n](https://github.com/crystal-i18n/i18n).","summary":"

Pluralization rule used for: Czech, Slovak.

","instance_methods":[{"html_id":"apply(count:Rosetta::CountArg):Symbol-instance-method","name":"apply","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"args_string":"(count : Rosetta::CountArg) : Symbol","args_html":"(count : Rosetta::CountArg) : Symbol","location":{"filename":"src/rosetta/pluralization/rule/west_slavic.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/pluralization/rule/west_slavic.cr#L9"},"def":{"name":"apply","args":[{"name":"count","external_name":"count","restriction":"Rosetta::CountArg"}],"return_type":"Symbol","visibility":"Public","body":"if count == 1\n :one\nelse\n if FROM_2_TO_4.includes?(count)\n :few\n else\n :other\n end\nend"}}]}]}]},{"html_id":"Rosetta/Rosetta/PluralizationRules","path":"Rosetta/PluralizationRules.html","kind":"annotation","full_name":"Rosetta::PluralizationRules","name":"PluralizationRules","abstract":false,"locations":[{"filename":"src/rosetta/annotations.cr","line_number":5,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/annotations.cr#L5"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/PluralizedTranslation","path":"Rosetta/PluralizedTranslation.html","kind":"module","full_name":"Rosetta::PluralizedTranslation","name":"PluralizedTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":85,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L85"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations with pluralizable values.","summary":"

Methods for translations with pluralizable values.

","instance_methods":[{"html_id":"t_hash(values:Hash)-instance-method","name":"t_hash","doc":"Using a hash for interpolation is considered unsafe since the content of\nhashes can't be checked at compile-time. Try to avoid using this method if\nyou can.","summary":"

Using a hash for interpolation is considered unsafe since the content of hashes can't be checked at compile-time.

","abstract":false,"args":[{"name":"values","external_name":"values","restriction":"Hash"}],"args_string":"(values : Hash)","args_html":"(values : Hash)","location":{"filename":"src/rosetta/translation.cr","line_number":89,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L89"},"def":{"name":"t_hash","args":[{"name":"values","external_name":"values","restriction":"Hash"}],"visibility":"Public","body":"if count = values[\"count\"]?\nelse\n message = \"Missing \\\"count\\\" from interpolation values\"\n raise(InterpolationArgumentException.new(message))\nend\nRosetta.interpolate(Rosetta.pluralize(count.to_s.to_i, raw), values)\n"}}]},{"html_id":"Rosetta/Rosetta/SimpleTranslation","path":"Rosetta/SimpleTranslation.html","kind":"module","full_name":"Rosetta::SimpleTranslation","name":"SimpleTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":60,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L60"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations without interpolations.","summary":"

Methods for translations without interpolations.

","instance_methods":[{"html_id":"t-instance-method","name":"t","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":61,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L61"},"def":{"name":"t","visibility":"Public","body":"raw"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/rosetta/translation.cr","line_number":69,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L69"},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io.puts(raw)"}},{"html_id":"to_s-instance-method","name":"to_s","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":65,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L65"},"def":{"name":"to_s","visibility":"Public","body":"raw"}}]},{"html_id":"Rosetta/Rosetta/Translatable","path":"Rosetta/Translatable.html","kind":"module","full_name":"Rosetta::Translatable","name":"Translatable","abstract":false,"locations":[{"filename":"src/rosetta/translatable.cr","line_number":3,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translatable.cr#L3"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Include this module in any class where you need to translate many keys.","summary":"

Include this module in any class where you need to translate many keys.

","macros":[{"html_id":"r(key)-macro","name":"r","doc":"Finds the translation for the given key. If the given key starts with a\n\".\", a prefix based on the current class name will be used. Unless a\n`Rosetta::Translatable::Config` annotation is defined with a value for\n`prefix`, which will then be used instead.\n\n@[Rosetta::Translatable::Config(prefix: \"user\")]\nclass Person\n include Rosetta::Translatable\n\n def greeting\n r(\".welcome_message\").t # => key resolves to \"user.welcome_message\"\n end\nend","summary":"

Finds the translation for the given key.

","abstract":false,"args":[{"name":"key","external_name":"key","restriction":""}],"args_string":"(key)","args_html":"(key)","location":{"filename":"src/rosetta/translatable.cr","line_number":17,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translatable.cr#L17"},"def":{"name":"r","args":[{"name":"key","external_name":"key","restriction":""}],"visibility":"Public","body":" \n{% if key.is_a?(StringLiteral) %}\n {% if key.starts_with?('.')\n config = @type.annotation(Rosetta::Translatable::Config)\n if config && config[:prefix]\n key = \"#{config[:prefix].id}#{key.id}\"\n else\n inferred_key = (@type.id.underscore.gsub(/::|\\(/, \".\")).gsub(/\\)/, \"\")\n key = \"#{inferred_key.id}#{key.id}\"\n end\nend %}\n\n Rosetta.find({{ key }})\n {% else %}\n {% raise(\"Only a StringLiteral can be used as a locale key.\\n\\n Use case to dynamically switch between locale keys. For example:\\n\\n case value\\n when \\\"one\\\"\\n r(\\\"key.option.one\\\").t\\n when \\\"two\\\"\\n r(\\\"key.option.two\\\").t\\n else\\n r(\\\"key.option.fallback\\\").t\\n end\\n\\n\") %}\n {% end %}\n\n \n"}}],"types":[{"html_id":"Rosetta/Rosetta/Translatable/Config","path":"Rosetta/Translatable/Config.html","kind":"annotation","full_name":"Rosetta::Translatable::Config","name":"Config","abstract":false,"locations":[{"filename":"src/rosetta/translatable.cr","line_number":56,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translatable.cr#L56"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta/Translatable","kind":"module","full_name":"Rosetta::Translatable","name":"Translatable"}}]},{"html_id":"Rosetta/Rosetta/Translation","path":"Rosetta/Translation.html","kind":"struct","full_name":"Rosetta::Translation","name":"Translation","abstract":true,"superclass":{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"Rosetta/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"Rosetta/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"Rosetta/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/rosetta/translation.cr","line_number":50,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L50"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Base struct for translation values.","summary":"

Base struct for translation values.

","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":50,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L50"},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":50,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L50"},"def":{"name":"initialize","visibility":"Public","body":""}},{"html_id":"raw-instance-method","name":"raw","doc":"Return the raw translation value for the current locale.","summary":"

Return the raw translation value for the current locale.

","abstract":false,"location":{"filename":"src/rosetta/translation.cr","line_number":54,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L54"},"def":{"name":"raw","visibility":"Public","body":"translations[Rosetta.locale]"}},{"html_id":"translations-instance-method","name":"translations","abstract":true,"location":{"filename":"src/rosetta/translation.cr","line_number":51,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L51"},"def":{"name":"translations","visibility":"Public","body":""}}]},{"html_id":"Rosetta/Rosetta/Translations","path":"Rosetta/Translations.html","kind":"alias","full_name":"Rosetta::Translations","name":"Translations","abstract":false,"locations":[{"filename":"src/rosetta/parser.cr","line_number":8,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L8"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Hash(String, String) | String)","aliased_html":"Hash(String, Hash(String, String) | String)","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/TranslationsHash","path":"Rosetta/TranslationsHash.html","kind":"alias","full_name":"Rosetta::TranslationsHash","name":"TranslationsHash","abstract":false,"locations":[{"filename":"src/rosetta/parser.cr","line_number":9,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/parser.cr#L9"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":true,"aliased":"Hash(String, Hash(String, Hash(String, String) | String))","aliased_html":"Hash(String, Hash(String, Hash(String, String) | String))","const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"}},{"html_id":"Rosetta/Rosetta/VariantsTranslation","path":"Rosetta/VariantsTranslation.html","kind":"module","full_name":"Rosetta::VariantsTranslation","name":"VariantsTranslation","abstract":false,"locations":[{"filename":"src/rosetta/translation.cr","line_number":100,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L100"}],"repository_name":"Rosetta","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"Rosetta/Rosetta","kind":"module","full_name":"Rosetta","name":"Rosetta"},"doc":"Methods for translations with variants.","summary":"

Methods for translations with variants.

","instance_methods":[{"html_id":"t_hash(values:Hash)-instance-method","name":"t_hash","doc":"Using a hash for interpolation is considered unsafe since the content of\nhashes can't be checked at compile-time. Try to avoid using this method if\nyou can.","summary":"

Using a hash for interpolation is considered unsafe since the content of hashes can't be checked at compile-time.

","abstract":false,"args":[{"name":"values","external_name":"values","restriction":"Hash"}],"args_string":"(values : Hash)","args_html":"(values : Hash)","location":{"filename":"src/rosetta/translation.cr","line_number":104,"url":"https://github.com/wout/rosetta/blob/71a7e05b/src/rosetta/translation.cr#L104"},"def":{"name":"t_hash","args":[{"name":"values","external_name":"values","restriction":"Hash"}],"visibility":"Public","body":"if variant = values[\"variant\"]?\nelse\n message = \"Missing \\\"variant\\\" from interpolation values\"\n raise(InterpolationArgumentException.new(message))\nend\nRosetta.interpolate(raw[variant], values)\n"}}]}]}]}}) \ No newline at end of file