Skip to content

String parsing crash with manual generator flutter_i18n/flutter_l10n/ #122

@EArminjon

Description

@EArminjon

Hello,

I add flutter_l10n to my pubspec.yaml to allow my team with others IDE as AndroidStudio or Intelij to generate translation.

So I add this :

 l10n_generator:
    git:
      url: https://github.com/long1eu/flutter_i18n
      path: flutter_l10n/

My team can run the package with the following commande :

flutter packages pub run l10n_generator:main -o lib/generated

But their is a problem which wasn't present when we use flutter_i18n plugin directly on the IDE :

In my arb file I have string like :
"appMessage": "The message... Blabla ...\n Blabla.",

When using generator manually, string parsing fail on the \n and I got this following string on generated/i18n.dart :

String get appMessage => "The message... Blabla...

Blabla.";

As you can see, the \n was interpreted and broke all the processus...

Can you fix it please :) ?

@noordawod

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions