Skip to content

Empty string as message content is ignored #329

@resah

Description

@resah

I use JSON files for translations, like

{
  "application": {
    "formatter": {
      "name": "My application formatter",
      "desc": "Some explanatory description for the formatter"
    },
    "v1": {
      "label": "Label for the version v1",
      "desc": "Description for this version",
      "fields": {
        "FirstVariableToSet": {
          "label": "MyVariable",
          "desc": ""
        }
      }
    }
  }
}

I think it is absolutely valid to have an empty translation for a key, like application.v1.fields.FirstVariableToSet.desc.

Unfortunately the key (and its value) is completely scrapped during message file import.

Culprit:

if src != "" {

Would it be possible to support empty message values in the future? Or maybe with a configuration parameter, whether they should be ignored or not.

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