We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Some languages don't have all strings available for translation
### Describe the issue

My project is here: https://hosted.weblate.org/projects/feeder/android-strings

A few languages Polish, French and Chinese (Simplified), are missing a dozen strings.

One example is the string `other_minutes` which is not available for translation in these languages.

I have tried re-scanning strings and similar with no change.

### I already tried

- [X] I've read and searched [the documentation](https://docs.weblate.org/).
- [X] I've searched for similar issues in this repository.

### Steps to reproduce the behavior

Not sure how to reproduce it but it is happening here :https://hosted.weblate.org/projects/feeder/android-strings

look at string `other_minutes`, it is missing from Polish, French, and Chinese (Simplified)

### Expected behavior

All strings should be available for translation in all languages.

### Screenshots

_No response_

### Exception traceback

_No response_

### How do you run Weblate?

weblate.org service

### Weblate versions

_No response_

### Weblate deploy checks

_No response_

### Additional context

_No response_

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `weblate/addons/cleanup.py`
Content:
```
1 # Copyright © Michal Čihař <michal@weblate.org>
2 #
3 # SPDX-License-Identifier: GPL-3.0-or-later
4 
5 from django.utils.translation import gettext_lazy
6 
7 from weblate.addons.base import UpdateBaseAddon
8 from weblate.addons.events import EVENT_POST_COMMIT, EVENT_POST_UPDATE, EVENT_PRE_COMMIT
9 from weblate.trans.exceptions import FileParseError
10 
11 
12 class BaseCleanupAddon(UpdateBaseAddon):
13     @classmethod
14     def can_install(cls, component, user):
15         if not component.has_template():
16             return False
17         return super().can_install(component, user)
18 
19 
20 class CleanupAddon(BaseCleanupAddon):
21     name = "weblate.cleanup.generic"
22     verbose = gettext_lazy("Cleanup translation files")
23     description = gettext_lazy(
24         "Update all translation files to match the monolingual base file. "
25         "For most file formats, this means removing stale translation keys "
26         "no longer present in the base file."
27     )
28     icon = "eraser.svg"
29     events = (EVENT_PRE_COMMIT, EVENT_POST_UPDATE)
30 
31     def update_translations(self, component, previous_head):
32         for translation in self.iterate_translations(component):
33             filenames = translation.store.cleanup_unused()
34             if filenames is None:
35                 continue
36             self.extra_files.extend(filenames)
37             translation.store_hash()
38 
39     def pre_commit(self, translation, author):
40         if translation.is_source and not translation.component.intermediate:
41             return
42         try:
43             filenames = translation.store.cleanup_unused()
44         except FileParseError:
45             return
46         if filenames is not None:
47             self.extra_files.extend(filenames)
48             translation.store_hash()
49 
50 
51 class RemoveBlankAddon(BaseCleanupAddon):
52     name = "weblate.cleanup.blank"
53     verbose = gettext_lazy("Remove blank strings")
54     description = gettext_lazy(
55         "Removes strings without a translation from translation files."
56     )
57     events = (EVENT_POST_COMMIT, EVENT_POST_UPDATE)
58     icon = "eraser.svg"
59 
60     def update_translations(self, component, previous_head):
61         for translation in self.iterate_translations(component):
62             filenames = translation.store.cleanup_blank()
63             if filenames is None:
64                 continue
65             self.extra_files.extend(filenames)
66             translation.store_hash()
67 
68     def post_commit(self, component):
69         self.post_update(component, None, skip_push=True)
70
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/weblate/addons/cleanup.py b/weblate/addons/cleanup.py
--- a/weblate/addons/cleanup.py
+++ b/weblate/addons/cleanup.py
@@ -34,7 +34,7 @@
             if filenames is None:
                 continue
             self.extra_files.extend(filenames)
-            translation.store_hash()
+            # Do not update hash here as this is just before parsing updated files
 
     def pre_commit(self, translation, author):
         if translation.is_source and not translation.component.intermediate:
@@ -63,7 +63,9 @@
             if filenames is None:
                 continue
             self.extra_files.extend(filenames)
-            translation.store_hash()
+            # Do not update hash in post_update, only in post_commit
+            if previous_head == "weblate:post-commit":
+                translation.store_hash()
 
     def post_commit(self, component):
-        self.post_update(component, None, skip_push=True)
+        self.post_update(component, "weblate:post-commit", skip_push=True)

{"golden_diff": "diff --git a/weblate/addons/cleanup.py b/weblate/addons/cleanup.py\n--- a/weblate/addons/cleanup.py\n+++ b/weblate/addons/cleanup.py\n@@ -34,7 +34,7 @@\n             if filenames is None:\n                 continue\n             self.extra_files.extend(filenames)\n-            translation.store_hash()\n+            # Do not update hash here as this is just before parsing updated files\n \n     def pre_commit(self, translation, author):\n         if translation.is_source and not translation.component.intermediate:\n@@ -63,7 +63,9 @@\n             if filenames is None:\n                 continue\n             self.extra_files.extend(filenames)\n-            translation.store_hash()\n+            # Do not update hash in post_update, only in post_commit\n+            if previous_head == \"weblate:post-commit\":\n+                translation.store_hash()\n \n     def post_commit(self, component):\n-        self.post_update(component, None, skip_push=True)\n+        self.post_update(component, \"weblate:post-commit\", skip_push=True)\n", "issue": "Some languages don't have all strings available for translation\n### Describe the issue\n\nMy project is here: https://hosted.weblate.org/projects/feeder/android-strings\r\n\r\nA few languages Polish, French and Chinese (Simplified), are missing a dozen strings.\r\n\r\nOne example is the string `other_minutes` which is not available for translation in these languages.\r\n\r\nI have tried re-scanning strings and similar with no change.\n\n### I already tried\n\n- [X] I've read and searched [the documentation](https://docs.weblate.org/).\n- [X] I've searched for similar issues in this repository.\n\n### Steps to reproduce the behavior\n\nNot sure how to reproduce it but it is happening here :https://hosted.weblate.org/projects/feeder/android-strings\r\n\r\nlook at string `other_minutes`, it is missing from Polish, French, and Chinese (Simplified)\n\n### Expected behavior\n\nAll strings should be available for translation in all languages.\n\n### Screenshots\n\n_No response_\n\n### Exception traceback\n\n_No response_\n\n### How do you run Weblate?\n\nweblate.org service\n\n### Weblate versions\n\n_No response_\n\n### Weblate deploy checks\n\n_No response_\n\n### Additional context\n\n_No response_\n", "before_files": [{"content": "# Copyright \u00a9 Michal \u010ciha\u0159 <michal@weblate.org>\n#\n# SPDX-License-Identifier: GPL-3.0-or-later\n\nfrom django.utils.translation import gettext_lazy\n\nfrom weblate.addons.base import UpdateBaseAddon\nfrom weblate.addons.events import EVENT_POST_COMMIT, EVENT_POST_UPDATE, EVENT_PRE_COMMIT\nfrom weblate.trans.exceptions import FileParseError\n\n\nclass BaseCleanupAddon(UpdateBaseAddon):\n    @classmethod\n    def can_install(cls, component, user):\n        if not component.has_template():\n            return False\n        return super().can_install(component, user)\n\n\nclass CleanupAddon(BaseCleanupAddon):\n    name = \"weblate.cleanup.generic\"\n    verbose = gettext_lazy(\"Cleanup translation files\")\n    description = gettext_lazy(\n        \"Update all translation files to match the monolingual base file. \"\n        \"For most file formats, this means removing stale translation keys \"\n        \"no longer present in the base file.\"\n    )\n    icon = \"eraser.svg\"\n    events = (EVENT_PRE_COMMIT, EVENT_POST_UPDATE)\n\n    def update_translations(self, component, previous_head):\n        for translation in self.iterate_translations(component):\n            filenames = translation.store.cleanup_unused()\n            if filenames is None:\n                continue\n            self.extra_files.extend(filenames)\n            translation.store_hash()\n\n    def pre_commit(self, translation, author):\n        if translation.is_source and not translation.component.intermediate:\n            return\n        try:\n            filenames = translation.store.cleanup_unused()\n        except FileParseError:\n            return\n        if filenames is not None:\n            self.extra_files.extend(filenames)\n            translation.store_hash()\n\n\nclass RemoveBlankAddon(BaseCleanupAddon):\n    name = \"weblate.cleanup.blank\"\n    verbose = gettext_lazy(\"Remove blank strings\")\n    description = gettext_lazy(\n        \"Removes strings without a translation from translation files.\"\n    )\n    events = (EVENT_POST_COMMIT, EVENT_POST_UPDATE)\n    icon = \"eraser.svg\"\n\n    def update_translations(self, component, previous_head):\n        for translation in self.iterate_translations(component):\n            filenames = translation.store.cleanup_blank()\n            if filenames is None:\n                continue\n            self.extra_files.extend(filenames)\n            translation.store_hash()\n\n    def post_commit(self, component):\n        self.post_update(component, None, skip_push=True)\n", "path": "weblate/addons/cleanup.py"}], "after_files": [{"content": "# Copyright \u00a9 Michal \u010ciha\u0159 <michal@weblate.org>\n#\n# SPDX-License-Identifier: GPL-3.0-or-later\n\nfrom django.utils.translation import gettext_lazy\n\nfrom weblate.addons.base import UpdateBaseAddon\nfrom weblate.addons.events import EVENT_POST_COMMIT, EVENT_POST_UPDATE, EVENT_PRE_COMMIT\nfrom weblate.trans.exceptions import FileParseError\n\n\nclass BaseCleanupAddon(UpdateBaseAddon):\n    @classmethod\n    def can_install(cls, component, user):\n        if not component.has_template():\n            return False\n        return super().can_install(component, user)\n\n\nclass CleanupAddon(BaseCleanupAddon):\n    name = \"weblate.cleanup.generic\"\n    verbose = gettext_lazy(\"Cleanup translation files\")\n    description = gettext_lazy(\n        \"Update all translation files to match the monolingual base file. \"\n        \"For most file formats, this means removing stale translation keys \"\n        \"no longer present in the base file.\"\n    )\n    icon = \"eraser.svg\"\n    events = (EVENT_PRE_COMMIT, EVENT_POST_UPDATE)\n\n    def update_translations(self, component, previous_head):\n        for translation in self.iterate_translations(component):\n            filenames = translation.store.cleanup_unused()\n            if filenames is None:\n                continue\n            self.extra_files.extend(filenames)\n            # Do not update hash here as this is just before parsing updated files\n\n    def pre_commit(self, translation, author):\n        if translation.is_source and not translation.component.intermediate:\n            return\n        try:\n            filenames = translation.store.cleanup_unused()\n        except FileParseError:\n            return\n        if filenames is not None:\n            self.extra_files.extend(filenames)\n            translation.store_hash()\n\n\nclass RemoveBlankAddon(BaseCleanupAddon):\n    name = \"weblate.cleanup.blank\"\n    verbose = gettext_lazy(\"Remove blank strings\")\n    description = gettext_lazy(\n        \"Removes strings without a translation from translation files.\"\n    )\n    events = (EVENT_POST_COMMIT, EVENT_POST_UPDATE)\n    icon = \"eraser.svg\"\n\n    def update_translations(self, component, previous_head):\n        for translation in self.iterate_translations(component):\n            filenames = translation.store.cleanup_blank()\n            if filenames is None:\n                continue\n            self.extra_files.extend(filenames)\n            # Do not update hash in post_update, only in post_commit\n            if previous_head == \"weblate:post-commit\":\n                translation.store_hash()\n\n    def post_commit(self, component):\n        self.post_update(component, \"weblate:post-commit\", skip_push=True)\n", "path": "weblate/addons/cleanup.py"}]}