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

Empty string as message content is ignored #329

Open
resah opened this issue Aug 2, 2024 · 1 comment
Open

Empty string as message content is ignored #329

resah opened this issue Aug 2, 2024 · 1 comment

Comments

@resah
Copy link

resah commented Aug 2, 2024

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.

@nicksnyder
Copy link
Owner

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

What problem does this cause for you?

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

No branches or pull requests

2 participants