Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in i18n.dart when using Indonesian locale #63

Open
umutseven92 opened this issue May 3, 2019 · 10 comments
Open

Error in i18n.dart when using Indonesian locale #63

umutseven92 opened this issue May 3, 2019 · 10 comments
Assignees
Labels

Comments

@umutseven92
Copy link

After adding an .arb file in Indonesian locale (which has the country code in), the plugin adds:

class in extends S {
  const in();
 } 

to generated/i18n.dart file, which fails because in is a reserved keyword in the dart language. Since any changes to i18n.dart gets overridden immediately, right now it is impossible to use this plugin for Indonesian locale.

@noordawod noordawod added the bug label May 13, 2019
@noordawod
Copy link
Contributor

That's an unfortunate bug, and will most probably cause backward-compatibility issues if we add a prefix or suffix to the class names. I guess we have to add special checks for in country code for now.

@noordawod noordawod self-assigned this May 13, 2019
@noordawod
Copy link
Contributor

@umutseven92 are you able to submit a pr (Kotlin) to fix this bug?

@umutseven92
Copy link
Author

@noordawod Sure, ill take a look as soon as a I am able.

@umutseven92
Copy link
Author

umutseven92 commented May 13, 2019

@noordawod So I did some digging and turns out this problem also occurred with the Icelandic locale (the country code is in, another reserved keyword). Issue here. It was fixed on 0.2, however since my Intellij version is 2019.1, I can only download version 0.0.6, which is very old. Long story short, I cannot test if the issue persists or not in the latest version. I will come back to this after Issue 53 is solved.

@noordawod
Copy link
Contributor

noordawod commented May 15, 2019

I will release a recent version of the plugin for 2019.1 this week. Thanks for taking the time to check this, @umutseven92!

@Lootwig
Copy link

Lootwig commented Jul 18, 2019

@noordawod Some part of your build pipeline seems to be broken. There has not been an update ever since you wrote that comment. I am currently forced to build the plugin locally and set "ideaVersionPrefix=191" manually in the gradle.properties.

@umutseven92
Copy link
Author

@Lootwig Yes, unfortunately this plugin seems to be abandoned (at least for now). Meanwhile I switched to VSCode and am using this plugin.

@noordawod
Copy link
Contributor

@umutseven92 not entirely abandoned, mind you, but the maintainers occasionally need to attend to other important matters in life. In any case, the most recent plugin code is now pushed to JetBrains' repo -- it'll take few days for them to approve it.

@mrkpatchaa
Copy link

@umutseven92 I am also switching to VSCode and I found the extension you mentionned.
The only "problem" is that it misses the option to create string values directly from code.
Screen Shot 2019-09-27 at 3 27 54 PM
Also, you need to run the update command every time you add a string.

@samuelg123
Copy link

Actually, "in" is deprecated for Indonesian Locale. Locale "id" is more recent for Indonesian.

I found this on window.dart

  // This map is generated by //flutter/tools/gen_locale.dart
  // Mappings generated for language subtag registry as of 2019-02-27.
  static const Map<String, String> _deprecatedLanguageSubtagMap = <String, String>{
    'in': 'id', // Indonesian; deprecated 1989-01-01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants