Closed emelyanovkirill closed 4 years ago
Struggling with this as well. Where exactly do you write "key" = "
"? Could you please attach example?
@dariagss I write it in Localizable.strings file (for one file is enough).
For example, "Plural.LessonCount" = "";
in Localizable.strings (English).
<key>Plural.LessonCount</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@lessonCount@</string>
<key>lessonCount</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>zero</key>
<string>no lessons</string>
<key>one</key>
<string>1 lesson</string>
<key>other</key>
<string>%d lessons</string>
</dict>
</dict>
Then R.string.localizable.pluralLessonCount(lessonCount: 5)
It worked, thank you! But this is so weird, and it doesn't solve the problem of mistyping that all this code generation is for, because I can still change a letter in the dict and r.swift won't tell me :(
@dariagss yes, this is workaround only, so I created this issue :)
Hi, thanks for creating this issue!
Can you elaborate on what you're doing to produce the error?
If I create a new project, add a Localizable.stringsdict file to it with an entry, then R.swift will generate code for that entry.
Closing due to inactivity.
R.generated don't generate for stringsdict. If I add
"key" = "";
, then R.sting.localizable.key(params for dict) works.