Transifex: Empty String


(Sebastien Miquerolle) #1

Continuing the discussion from Translators We Want You!:

I noticed an issue with Transifex and the translation of empty string like: en.topic.notifications.title: ''

Transifex don’t add this string to the translation strings, so when I export the yml, the line is not here. Maybe we need to add a rule to manage this case.

cc: @camilohollanda , @jbruni, @hey_julien


( hey_julien) #2

This is one more issue that we need to manage on our own, because transifex don’t.


(blang) #3

If you’re exporting as ‘For translation’ (not ‘for use’) empty strings get included. Does that solve the problem?


(Sebastien Miquerolle) #4

Yes, empty string are include with “For Translation”. Is it the only difference between for use / for translation ?


(blang) #5

Yep, at least that’s what i noticed


(Sebastien Miquerolle) #6

I noticed another difference in server.*.yml for some key

  • For user: new-topic
  • For translate: 'new-topic'

I don’t know if it’s correct to have quote on the key.


(blang) #7

That’s valid yaml because the dash is not alpha numeric


(Sebastien Miquerolle) #8

Ok, but why do we have empty string in a translation file ? A empty string cannot be translated. And - for french translation - I’ll never add text for these empty string.

In my example en.topic.notifications.title: '' all translations have this empty string.

If we remove them, the neil’s issue could be solved by use “Download for Use”.

Any argument to keep empty string in locales ?


(Neil Lalonde) #9

Good point. If a string hasn’t been translated and is missing from the yml file, it will be rendered with something like [fr_FR.filters.unread.title]. It makes it easy to spot which translations are missing.

EDIT: I’m going to go with the “download for use” version, because we want to see which translations are missing. So, I’m not blocked anymore and will continue to make progress.


(blang) #10

As already mentioned download ‘for use’ will remove empty strings and as far as i checked, de.topic.notifications.title is the only empty string, which is not even available in transifex.

If someone could add this key to transifex and inserts {{}} or something not empty as value, that would make the german translation (at least on the client side) production ready.


(Neil Lalonde) #11

I removed the topic.notifications.title key entirely since it’s always an empty string. If the english translation is an empty string, it shouldn’t be there at all.


(blang) #12

Thanks, that’s the best solution i guess.


(Gerhard Schlager) #13

client.en.yml contains a few untranslatable keys:

  • admin_js.admin.email.logs.filters.reply_key_placeholder
  • js.filters.unread.lower_title_with_count.zero
  • js.filters.new.lower_title_with_count.zero

I haven’t seen the last two on the UI yet, but the first one is shown as untranslated. However, it’s not available for translation in Transifex.


(Gerhard Schlager) #14

Well, I just found a new string that has an empty English translation. Please add English translations or remove them. Otherwise we get to see those ugly translation keys in languages other than English. :frowning:

  • js.composer.auto_close.all.units
  • still there (are they even used?)
    • js.filters.unread.lower_title_with_count.zero
    • js.filters.new.lower_title_with_count.zero