You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+19-3
Original file line number
Diff line number
Diff line change
@@ -75,8 +75,6 @@ Flutter internalization only depends on a small subset of the ARB format. Each .
75
75
76
76
<b>The first English file is generated for you(/res/values/strings_en.arb).</b> Every arb file depends on this one. If you have an a string in the German arb file(/res/values/strings_de.arb) that has an ID that is <b>not found</b> in the English file, it would not be listed. So you must be sure to first have the strings in the English file and then add other translations.
77
77
78
-
Do not add white spaces or illegal characters in your IDs. They should match this RegEx <b>[a-zA-Z]</b> <spanstyle="color: rgb(0, 0, 0); font-family: "SourceSansPro", "HelveticaNeue", Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline!important; float: none;">for now</span>. The IDE doesn't worn you if your ID doesn't match.
79
-
80
78
To add a new arb file right click on <b>values</b> folder and select <b>New</b> -><b> Arb </b><b>File</b>. Then pick your language from the list, and region if necessary.
81
79
82
80
#### 1. Referencing the values
@@ -105,7 +103,7 @@ The value for this resource ID is retrieved with a parametrized method instead o
105
103
106
104
#### 3. Plurals
107
105
108
-
Plural translations can be provided for several quantities: 0, 1, 2, "few", "many", "other". The variations are identified by a resource ID suffix which must be one of "Zero", "One", "Two", "Few", "Many", "Other". The "Other" variation is used when none of the other quantities apply. All plural resources must include a resource with the "Other" suffix. For example the English translations ('material_en.arb') for selectedRowCountTitle in the [Material Library Localizations](https://github.com/flutter/flutter/tree/master/packages/flutter_localizations/lib/src/l10n) are:
106
+
Plural translations can be provided for several quantities: 0, 1, 2, "few", "many", "other". The variations are identified by a resource ID suffix which must be one of "Zero", "One", "Two", "Few", "Many", "Other" (case insensitive). The "Other" variation is used when none of the other quantities apply. All plural resources must include a resource with the "Other" suffix. For example the English translations ('material_en.arb') for selectedRowCountTitle in the [Material Library Localizations](https://github.com/flutter/flutter/tree/master/packages/flutter_localizations/lib/src/l10n) are:
val key = (it.nameElement asJsonStringLiteral).value
21
+
22
+
if (!key.startsWith('@') &&!keyPattern.containsMatchIn(key)) {
23
+
manager.createProblemDescriptor(
24
+
it.nameElement,
25
+
displayName,
26
+
isOnTheFly,
27
+
null,
28
+
ProblemHighlightType.GENERIC_ERROR
29
+
)
30
+
} elsenull
31
+
}.toTypedArray()
30
32
}
31
33
returnnull
32
34
}
33
35
34
-
overridefungetDisplayName(): String="The string key must be a valid Dart field name."
36
+
overridefungetDisplayName(): String="The string key can start with a letter or underscore (_), followed by any combination of those characters plus digits."
0 commit comments