Skip to content

Commit 041df02

Browse files
committed
merge pull request
1 parent 75806dc commit 041df02

File tree

6 files changed

+105
-8
lines changed

6 files changed

+105
-8
lines changed

CHANGELOG.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
**<span style="font-size: 18px;">0.2</span>**
2+
3+
* **Braking change** - Lang classes are prefixed by $ sign. If you use them directly you should update them or use `S.of(context)`
4+
* fix icelandic class
5+
* add arb key checker, now the IDE will raise an error if you try to set an illegal key
6+
* escape parameter in form of ${variable}
7+
8+
**<span style="font-size: 18px;">0.1.1 - 2018.1</span>**
9+
10+
* fix plurals searching
11+
12+
**<span style="font-size: 18px;">0.0.8</span>**
13+
14+
* escape dollar sign
15+
* plural keywords are now case insensitive
16+
17+
**<span style="font-size: 18px;">0.0.7</span>**
18+
19+
* handles null locales
20+
21+
**<span style="font-size: 18px;">0.0.6+1</span>**
22+
23+
* fixed hebrew const issues
24+
25+
**<span style="font-size: 18px;">0.0.6</span>**
26+
27+
* optimized the S class by adding const constructors and removing unnecessary fields
28+
* order string fields alphabetically in the S class
29+
* preparing lib for adding other resource binders
30+
31+
**<span style="font-size: 18px;">0.0.5</span>**
32+
33+
* fix some crashes
34+
* add ignore comment for the dart analyzer
35+
* change the way files are build
36+
37+
**<span style="font-size: 18px;">0.0.4</span>**
38+
39+
* add intention action to extract the string resources
40+
* add intent action to override the string in another language
41+
42+
**<span style="font-size: 18px;">0.0.3</span>**
43+
44+
* fixed crash on Flutter
45+
* add Hebrew fallback support, iw=he
46+
* added text direction support
47+
48+
**<span style="font-size: 18px;">0.0.2</span>**
49+
50+
* update only the class that changes
51+
* add rebuild action
52+
53+
**<span style="font-size: 18px;">0.0.1</span>**
54+
55+
* first release

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This plugin helps you internationalize you Flutter app by generating be needed b
1313
Widget build(BuildContext context) {
1414
return new MaterialApp(
1515
onGenerateTitle: (BuildContext context) => S.of(context).app_name,
16-
<b>localizationsDelegates: const <LocalizationsDelegate<WidgetsLocalizations>>[
16+
<b>localizationsDelegates: const </**/LocalizationsDelegate</**/WidgetsLocalizations>>[
1717
S.delegate,
1818
// You need to add them if you are using the material library.
1919
// The material components usses this delegates to provide default

build.gradle

+11-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
group 'eu.long1.flutter'
7-
version '0.2.1'
7+
version '1.0'
88

99
repositories {
1010
mavenCentral()
@@ -24,12 +24,18 @@ compileTestKotlin {
2424
kotlinOptions.jvmTarget = "1.8"
2525
}
2626

27+
patchPluginXml {
28+
version '1.0.3'
29+
sinceBuild '181.5540.23'
30+
untilBuild '181.*'
31+
}
32+
2733
intellij {
28-
version '181.5540.7'
2934
pluginName 'Flutter i18n'
35+
version '181.5540.23'
3036
plugins = [
31-
"Dart:181.3263.21",
32-
"io.flutter:30.0.1",
37+
"Dart:181.4445.29",
38+
"io.flutter:31.3.1",
3339
"yaml"
3440
]
3541
}
@@ -42,6 +48,7 @@ if (localPropertiesFile.exists()) {
4248
}
4349
}
4450

51+
4552
publishPlugin {
4653
username = localProperties.getProperty('username')
4754
password = localProperties.getProperty('password')

product-matrix.json

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"list": [
3+
{
4+
"comments": "2018.1",
5+
"ideaVersion": "181.5540.23",
6+
"dartPluginVersion": "181.4445.29",
7+
"flutterPluginVersion": "31.3.1",
8+
"sinceBuild": "181.5540.23",
9+
"untilBuild": "181.*"
10+
},
11+
{
12+
"comments": "2018.2",
13+
"ideaVersion": "182.5107.41",
14+
"dartPluginVersion": "182.5124",
15+
"flutterPluginVersion": "32.0.2",
16+
"sinceBuild": "182.5107.7",
17+
"untilBuild": "182.*"
18+
},
19+
{
20+
"comments": "2018.3",
21+
"ideaVersion": "183.5153.38",
22+
"dartPluginVersion": "183.5901",
23+
"flutterPluginVersion": "32.0.3",
24+
"sinceBuild": "183.5153.38.34.*",
25+
"untilBuild": "183.*"
26+
},
27+
{
28+
"comments": "2019.1",
29+
"ideaVersion": "191.4738.6",
30+
"dartPluginVersion": "191.4738.6",
31+
"flutterPluginVersion": "32.0.3",
32+
"sinceBuild": "191.0",
33+
"untilBuild": "191.*"
34+
}
35+
]
36+
}

src/main/kotlin/eu/long1/flutter/i18n/inspections/JsonKeysInspector.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ class JsonKeysInspector : BaseLocalInspectionTool() {
1818
.filter { !it.name.startsWith("@") }
1919
.mapNotNull {
2020
val key = (it.nameElement as JsonStringLiteral).value
21-
22-
if (!key.startsWith('@') && !keyPattern.containsMatchIn(key)) {
21+
if (!keyPattern.containsMatchIn(key)) {
2322
manager.createProblemDescriptor(
2423
it.nameElement,
2524
displayName,

src/main/kotlin/eu/long1/flutter/i18n/workers/I18nFileGenerator.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class I18nFileGenerator(private val project: Project) {
6666
}
6767

6868
private fun stringFiles(): ArrayList<VirtualFile> = valuesFolder.children.filter {
69-
it.extension == ArbFileType.defaultExtension && it.name.startsWith("strings_", true)
69+
it.extension == ArbFileType.defaultExtension && it.name.startsWith("strings_", ignoreCase = true)
7070
} as ArrayList
7171

7272
private fun appendSClass(en: HashMap<String, String>, builder: StringBuilder) {

0 commit comments

Comments
 (0)