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

Missing documentation: How to manually update .pot file? #4962

Closed
1 task done
mikkorantalainen opened this issue Dec 2, 2020 · 7 comments
Closed
1 task done

Missing documentation: How to manually update .pot file? #4962

mikkorantalainen opened this issue Dec 2, 2020 · 7 comments
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.

Comments

@mikkorantalainen
Copy link

mikkorantalainen commented Dec 2, 2020

Describe the issue

I'm trying to use Weblate without trusting it to access the real git repository I'm using (neither push nor pull). I was able to submit existing messages.pot and partial localization .po files using the zip package upload while adding a component.

However, the method to update the messages.pot without using git repository connection is non-existant or the UI is hidden so well that I cannot find it.

I already tried

  • I've read and searched the docs and did not find the answer there.
  • Note that I'm looking for a way to update the .pot file only, I don't need msgmerge which is an existing add-on.
  • I would have expected to see option to upload new .pot file in component view "Files" dropdown menu. Currently it seems to only contain option "Download translation files as ZIP file". Another option would be "Manage" dropdown menu or "Manage" -> "Settings" -> "Files" view.
  • Documentation at https://docs.weblate.org/en/weblate-4.3.2/user/files.html#upload-method describes a feature called "Update source strings" which is not available (maybe because I have selected "File format" "gettext PO file" in component Manage->Settings->Files view). My source strings (msgid) are "developer english" and there's en.po for proper English localization, too.

To Reproduce

Steps to reproduce the behavior:

  1. Create component with option "Upload translation files" and upload file all.zip containing messages.pot and collection of .po files.
  2. Select "Version control system" option "No remote repository"

There appears no way to upload a new messages.pot file when I add new base strings. If the only supported method is to always create new component without version control connection this should be documented.

My intent is to submit new messages.pot into weblate and collect modified translations using "Download translation files as ZIP file" from the component view.

Server configuration and status

$ lsb_release -d
Description: Ubuntu 20.04.1 LTS

$ pip show weblate
Name: Weblate
Version: 4.3.2
Summary: A web-based continuous localization system with tight version control integration
Home-page: https://weblate.org/

@mikkorantalainen mikkorantalainen added the question This is more a question for the support than an issue. label Dec 2, 2020
@github-actions
Copy link

github-actions bot commented Dec 2, 2020

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger. In case your question is already answered, making a donation is the right way to say thank you!

@mikkorantalainen mikkorantalainen changed the title How to manually update .pot file? Missing documentation: How to manually update .pot file? Dec 2, 2020
@nijel
Copy link
Member

nijel commented Dec 2, 2020

In case you want to replace single file, use "Replace existing translation file" on upload. For monolingual translation, it will automatically update it. For bilingual you want to use msgmerge to update the translation files.

@mikkorantalainen
Copy link
Author

I have gettext bilingual setup with 7 translated languages (.po files) + one "messages.pot" file. The msgid values are in English but may contain typos or not-so-fluent text and we have en.po to fix those issues so it's arguable that this is actually monolingual project instead.

When the source code is updated and I run xgettext to include new 'msgid' strings into messages.pot, how I'm supposed to get all languages to have empty translations for the new strings? Is the expected way to really use msgmerge add-on and just update any random language in Weblate UI with a file that contains the new msgid without translation?

If this is indeed the expected workflow, it would deserve a paragraph or two in the official documentation.

I would have expected some UI where I can drop the new messages.pot file. Preferably at the component level, not on a single language level because the template file is shared by all languages.

nijel added a commit that referenced this issue Dec 3, 2020
It was hidden somewhere deep in the user docs. Make it prominent top
level document as it describes the basics.

Issue #4962
@nijel
Copy link
Member

nijel commented Dec 3, 2020

Yes, with traditional Gettext workflow, you are supposed to run msgmerge. See https://docs.weblate.org/en/latest/devel/gettext.html or https://www.gnu.org/software/gettext/manual/html_node/Overview.html

@mikkorantalainen
Copy link
Author

Do you understand that in my opinion the weblate UI should have different UI for sending the template (shared between all languages) and another UI for sending the translation for a single language?

Creating a new component does already work but updating existing component to use new messages.pot file has usability problems in the Weblate UI in my opinion.

nijel added a commit that referenced this issue Dec 3, 2020
When pot is present, the source translation now has a filename.

Issue #4962
@nijel
Copy link
Member

nijel commented Dec 3, 2020

The interface is there on the source language. I've just noticed that there is a bug that it doesn't show the "Update source strings" in some situations: 42bc1bc

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had 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 Dec 24, 2020
@github-actions github-actions bot closed this as completed Jan 2, 2021
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