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

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

Open
2 tasks done
vinaygopinath opened this issue May 15, 2024 · 5 comments
Open
2 tasks done
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.

Comments

@vinaygopinath
Copy link

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

  • I've read and searched the documentation.
  • 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

@nijel
Copy link
Member

nijel commented May 16, 2024

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 nijel added the question This is more a question for the support than an issue. label May 16, 2024
Copy link

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!

@vinaygopinath
Copy link
Author

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.

@nijel
Copy link
Member

nijel commented May 16, 2024

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.

Copy link

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 github-actions bot added the wontfix Nobody will work on this. label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.
Projects
None yet
Development

No branches or pull requests

2 participants