weblate icon indicating copy to clipboard operation
weblate copied to clipboard

Skipping empty strings?

Open Frexuz opened this issue 7 years ago • 17 comments

Is it possible to skip empty-on-purpose translation strings?

This is a standard Rails yaml file:

en:
  number:
    human:
      decimal_units:
        format: "%n %u"
        units:
          billion: Billion
          million: Million
          quadrillion: Quadrillion
          thousand: Thousand
          trillion: Trillion
          unit: ''
      format:
        delimiter: ''
        significant: true
        strip_insignificant_zeros: true
      storage_units:
        format: "%n %u"
        units:
          byte:
            one: Byte
            other: Bytes
          gb: GB
          kb: KB
          mb: MB
          tb: TB
    percentage:
      format:
        delimiter: ''
    precision:
      format:
        delimiter: ''

A bit annoying needing to skip these every time, as well as always having a few "Strings needing actions" screen shot 2018-03-22 at 15 53 01

There doesn't seem to be a Flag for this

Frexuz avatar Mar 22 '18 07:03 Frexuz

There is currently no way to tell Weblate that empty string is actually valid translation, it will always think the string is not translated.

nijel avatar Mar 22 '18 16:03 nijel

Possible feature request? Or will never happen? :D

Frexuz avatar Mar 23 '18 06:03 Frexuz

I have the exact same issue. I would love to be able to ignore this specific context, or at least have it marked as complete if I hit the Save button on it. They're really annoying once the project gets large (with lots of blank strings), because it's hard to find new strings that actually need translating -- you have to walk through tons of empty strings to find the new stuff.

aardvarkk avatar Jul 27 '18 20:07 aardvarkk

+1 for this improvement: please find a way to handle empty source strings.

  • either automatically consider these strings like already valid translated strings for all languages
  • or allow translators to manually validate this kind of strings and to remove them, in each language, from the list of "need to be translated".

ldmpub avatar Oct 01 '18 19:10 ldmpub

Will marking them as less/un- important by an admin do it?

comradekingu avatar Jan 16 '19 21:01 comradekingu

Yes from my point of view, admin / reviewer can just "validate" each empty string ... that's not perfect but it works.

ldmpub avatar Jan 16 '19 21:01 ldmpub

We ran into the same situation now. How are you handling this currently? @ldmpub

cars10w avatar Jul 05 '19 10:07 cars10w

I need it too please.

lmwattebled avatar Sep 29 '19 18:09 lmwattebled

3y this is problem.... super :(

Sediqwe avatar May 02 '21 08:05 Sediqwe

We've run into the very same problem with our project... There's only a feature to mark a source string and all corresponding translation strings ´read-only´, but there's no way validate that a single empty translation is ´valid´ and being left empty on purpose. Left empty translations always fall back to the source string with our setup and that's the way it's supposed to be here - WebLate doesn't want this though.

Can we please get a feature to be able to validate or approve single empty translations? 👍🏻

Ch1llb0 avatar Sep 12 '21 12:09 Ch1llb0

Agree on this. I can't set an empty string as translated as for example in poedit. It always counts as untranslated, not good at all!

pehlm avatar Sep 26 '21 09:09 pehlm

I tried to cheat with a zero-width space in https://hosted.weblate.org/translate/gogocarto/map-page-javascript-library/nb_NO/?checksum=4d72c7d764f1d9da but that didn't work.

comradekingu avatar Oct 10 '21 11:10 comradekingu

This would be a useful flag to have. Something like skip-empty. I have a project that has Latin as one of the languages, and there are a few strings that won't ever exist in Latin because they are taken care of by the Latin genitive case in other adjacent strings. If I mark these strings as read-only I no longer get the warning about untranslated strings, however these strings can no longer be translated in any language. It would be nice to have a skip-empty flag so the strings are translatable in any language but ignored if empty.

JohnRDOrazio avatar Dec 16 '21 13:12 JohnRDOrazio

I need to store a list of "articles" (a|A|an|An|the|The) for each language. Some language do not have the concept of articles, so their string for it will be empty. Now each time I pull weblate into my project, those empty strings are deleted and I need to manually restore them. The proposed skip-empty would work well I think

tfonteyn avatar Oct 02 '23 09:10 tfonteyn

Do we have any progress on this? Anything from the devs?

CommanderRedYT avatar Aug 29 '24 10:08 CommanderRedYT

Some reply by the devs would be nice... Feels kind of strange to have an OSS project, but not reply to feature requests for years.

Please add a feature that let's us either skip empty strings or mark them as translated!

Ch1llb0 avatar Mar 23 '25 06:03 Ch1llb0

Indeed, this is an OSS project and welcomes contributions. It feels kind of strange that this issue was not important enough for anybody to contribute a solution to it.

Maybe you didn't notice that there are 460 open issues on this repository. Unfortunately, we don't have unlimited resources to resolve all issues as fast as we would like to.

PS: This issue is difficult to address because the translation files do not store state at all. Either the string is there and is translated, or is empty, and then it is not translated. So it's not just Weblate being able to change the state internally to translated (what would be mostly UI feature), but it needs to preserve the state when the file is being parsed.

nijel avatar Apr 02 '25 06:04 nijel