Skip to content

translations seem to be required #1

Open
@CodyLBainter

Description

@CodyLBainter

When creating a config.yaml file of the form:

id: some_module_scope

configuration:
  misc:
    some_url: 'blah'

I ran into the following error:

Bad state: No element
Unhandled exception:
Bad state: No element
#0 ListIterable.reduce (dart:_internal/iterable.dart:181:22)
#1 I18nParser.parse (package:configurator/src/utils/parser.dart:394:8)
#2 ConfigWriter.write.. (package:configurator/src/writers/configuration_writer.dart:264:56)
#3 ConfigWriter.write. (package:configurator/src/writers/configuration_writer.dart:277:14)
#4 _$ClassBuilder.update (package:code_builder/src/specs/class.g.dart:345:33)
#5 new _$Class (package:code_builder/src/specs/class.g.dart:40:28)
#6 ConfigWriter.write (package:configurator/src/writers/configuration_writer.dart:48:12)
#7 ProcessedConfig.write (package:configurator/src/models/processed_config.dart:89:9)
#8 generateConfigurations. (file:///Users/SOMEUSER/.pub-cache/git/configurator-306acd2cb391e65b3e8494e2bed6d0c7f9bb25e8/configurator/bin/configurator.dart:412:29)

#9 generateConfigurations (file:///Users/SOMEUSER/.pub-cache/git/configurator-306acd2cb391e65b3e8494e2bed6d0c7f9bb25e8/configurator/bin/configurator.dart:407:24)

#10 configure (file:///Users/SOMEUSER/.pub-cache/git/configurator-306acd2cb391e65b3e8494e2bed6d0c7f9bb25e8/configurator/bin/configurator.dart:317:5)

It seems that when parsing my config.yaml the error was thrown when it encountered my missing i18n and children nodes.

Just to be safe I've tried running the configurator with variations. The end result, we must have at least one complete key/value pair under the i18n node in order to successfully generate.

It's not a huge issue to have a placeholder:

configuration:
  i18n:
    en_us:
      common:
        test: 'test'

but for this particular use case, it's just not necessary. The module in question just has data related to some backend interactions, no UI-related strings.

Thanks,
Cody

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