weblate icon indicating copy to clipboard operation
weblate copied to clipboard

Ignore translatable=false Android string resources when "Add missing languages" is enabled

Open vinaygopinath opened this issue 1 year ago • 4 comments

Describe the issue

In an Android project with English as the source language and the "Missing languages" add-on enabled, the string resource files of other languages contain string resources such as

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string translatable="false" name="some_untranslatable_string_resource"></string>
    <string translatable="false" name="some_other_untranslatable_string_resource"></string>
</resources>

I already tried

  • [X] I've read and searched the documentation.
  • [X] I've searched for similar filed issues in this repository.

Steps to reproduce the behavior

  1. Add a new Android string resource with the attribute "translatable" set to false

Expected behavior

Given that the string resource is clearly marked as not translatable, the "Missing languages" add-on should ignore creating string resources in other languages.

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

Docker container

Weblate versions

No response

Weblate deploy checks

No response

Additional context

No response

vinaygopinath avatar May 15 '24 23:05 vinaygopinath

Why do you have that file in Weblate if it contains only non-translatable strings? Once you have it imported into Weblate, the add-on applies, no matter whether the file is currently empty or not.

nijel avatar May 16 '24 05:05 nijel

This issue has been marked as a question by a Weblate team member. Why? Because it belongs more to the professional Weblate Care or community Discussions than here. We strive to answer these reasonably fast here, too, but purchasing the support subscription is more responsible and faster for your business. And it makes Weblate stronger as well. Thanks!

In case your question is already answered, making a donation is the right way to say thank you!

github-actions[bot] avatar May 16 '24 05:05 github-actions[bot]

The file does not contain only untranslatable strings. It's only a few of them that have the translatable attribute.

I'd prefer to define them as string resources even if they're currently not translatable, to leave open the possibility of translating them later.

vinaygopinath avatar May 16 '24 06:05 vinaygopinath

Ah, now I finally understand that — the question is not about creating files, but the content of the created files? If you want to start with a blank file, unset Template for new translations.

nijel avatar May 16 '24 06:05 nijel

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

github-actions[bot] avatar May 31 '24 01:05 github-actions[bot]