Skip to content

Commit

Permalink
merge pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
long1eu committed Feb 14, 2019
1 parent 75806dc commit 041df02
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 8 deletions.
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
**<span style="font-size: 18px;">0.2</span>**

* **Braking change** - Lang classes are prefixed by $ sign. If you use them directly you should update them or use `S.of(context)`
* fix icelandic class
* add arb key checker, now the IDE will raise an error if you try to set an illegal key
* escape parameter in form of ${variable}

**<span style="font-size: 18px;">0.1.1 - 2018.1</span>**

* fix plurals searching

**<span style="font-size: 18px;">0.0.8</span>**

* escape dollar sign
* plural keywords are now case insensitive

**<span style="font-size: 18px;">0.0.7</span>**

* handles null locales

**<span style="font-size: 18px;">0.0.6+1</span>**

* fixed hebrew const issues

**<span style="font-size: 18px;">0.0.6</span>**

* optimized the S class by adding const constructors and removing unnecessary fields
* order string fields alphabetically in the S class
* preparing lib for adding other resource binders

**<span style="font-size: 18px;">0.0.5</span>**

* fix some crashes
* add ignore comment for the dart analyzer
* change the way files are build

**<span style="font-size: 18px;">0.0.4</span>**

* add intention action to extract the string resources
* add intent action to override the string in another language

**<span style="font-size: 18px;">0.0.3</span>**

* fixed crash on Flutter
* add Hebrew fallback support, iw=he
* added text direction support

**<span style="font-size: 18px;">0.0.2</span>**

* update only the class that changes
* add rebuild action

**<span style="font-size: 18px;">0.0.1</span>**

* first release
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This plugin helps you internationalize you Flutter app by generating be needed b
Widget build(BuildContext context) {
return new MaterialApp(
onGenerateTitle: (BuildContext context) => S.of(context).app_name,
<b>localizationsDelegates: const <LocalizationsDelegate<WidgetsLocalizations>>[
<b>localizationsDelegates: const </**/LocalizationsDelegate</**/WidgetsLocalizations>>[
S.delegate,
// You need to add them if you are using the material library.
// The material components usses this delegates to provide default
Expand Down
15 changes: 11 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group 'eu.long1.flutter'
version '0.2.1'
version '1.0'

repositories {
mavenCentral()
Expand All @@ -24,12 +24,18 @@ compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}

patchPluginXml {
version '1.0.3'
sinceBuild '181.5540.23'
untilBuild '181.*'
}

intellij {
version '181.5540.7'
pluginName 'Flutter i18n'
version '181.5540.23'
plugins = [
"Dart:181.3263.21",
"io.flutter:30.0.1",
"Dart:181.4445.29",
"io.flutter:31.3.1",
"yaml"
]
}
Expand All @@ -42,6 +48,7 @@ if (localPropertiesFile.exists()) {
}
}


publishPlugin {
username = localProperties.getProperty('username')
password = localProperties.getProperty('password')
Expand Down
36 changes: 36 additions & 0 deletions product-matrix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"list": [
{
"comments": "2018.1",
"ideaVersion": "181.5540.23",
"dartPluginVersion": "181.4445.29",
"flutterPluginVersion": "31.3.1",
"sinceBuild": "181.5540.23",
"untilBuild": "181.*"
},
{
"comments": "2018.2",
"ideaVersion": "182.5107.41",
"dartPluginVersion": "182.5124",
"flutterPluginVersion": "32.0.2",
"sinceBuild": "182.5107.7",
"untilBuild": "182.*"
},
{
"comments": "2018.3",
"ideaVersion": "183.5153.38",
"dartPluginVersion": "183.5901",
"flutterPluginVersion": "32.0.3",
"sinceBuild": "183.5153.38.34.*",
"untilBuild": "183.*"
},
{
"comments": "2019.1",
"ideaVersion": "191.4738.6",
"dartPluginVersion": "191.4738.6",
"flutterPluginVersion": "32.0.3",
"sinceBuild": "191.0",
"untilBuild": "191.*"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ class JsonKeysInspector : BaseLocalInspectionTool() {
.filter { !it.name.startsWith("@") }
.mapNotNull {
val key = (it.nameElement as JsonStringLiteral).value

if (!key.startsWith('@') && !keyPattern.containsMatchIn(key)) {
if (!keyPattern.containsMatchIn(key)) {
manager.createProblemDescriptor(
it.nameElement,
displayName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class I18nFileGenerator(private val project: Project) {
}

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

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

0 comments on commit 041df02

Please sign in to comment.