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

Namespaces bug #54

Closed
mjablecnik opened this issue Feb 10, 2022 · 3 comments
Closed

Namespaces bug #54

mjablecnik opened this issue Feb 10, 2022 · 3 comments
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@mjablecnik
Copy link

Hello, I experiment with namespaces for split my one input file into more files.
I had in strings.i18n.json this json structure:

{
  "core": {
    ...
  },
  "app": {
    "title": "Example App",
    ...
  },
  "auth": {
    ...
  },
  "barcode_registration": {
    ...
  }
}

And I split it into this folder structure:
image

But when I run flutter pub run fast_i18n command so it generate translations only for core, app and auth but
translations in barcode_registration section is not generated..:
image

Probably there is a problem with _ and it doesn't create barcodeRegistration property.
image

Can you fix it please?

Here is my build.yaml configuration:

targets:
  $default:
    builders:
      fast_i18n:
        options:
          base_locale: cs
          translate_var: translate
          key_case: camel
          key_map_case: camel
          param_case: camel
          string_interpolation: double_braces
          input_directory: lib/core/i18n
          namespaces: true
          output_format: multiple_files
          output_file_name: strings.g.dart
          output_directory: lib/core/i18n
          maps:
            - core.changeLanguage.languages

Thank you very much.

@mjablecnik mjablecnik added the bug Something isn't working label Feb 10, 2022
@Tienisto
Copy link
Member

Have you tried to rename barcode_registration.i18n.json to barcodeRegistration.i18n.json?

@mjablecnik
Copy link
Author

Yes after rename now it works:
image
image

@Tienisto
Copy link
Member

Glad I could help :)

@Tienisto Tienisto added the invalid This doesn't seem right label Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants