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

Addon - Squash Git commits - Template markup not working #7339

Open
2 tasks done
markoph opened this issue Mar 3, 2022 · 6 comments
Open
2 tasks done

Addon - Squash Git commits - Template markup not working #7339

markoph opened this issue Mar 3, 2022 · 6 comments
Labels
backlog This is not on the Weblate roadmap for now. Can be prioritized by sponsorship. enhancement Adding or requesting a new feature.

Comments

@markoph
Copy link

markoph commented Mar 3, 2022

Describe the issue

I see template markup (variables) in commit message instead of strings these variables represent.

Documentation of addon-weblate-git-squash) indicates it should work:

The original commit messages can optionally be overridden with a custom commit message. See Template markup for the message options.

I already tried

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

Steps to reproduce the behavior

  1. Go to component addons. Add addon "Squash Git commits".
  2. Configure it as follows:
    • Commit squashing - per file
    • Append trailers to squashed commit message - checked
    • Commit message - use template markup. Eg. Translated using Weblate ({{ language_name }} / {{ filename }})
  3. Check commits. You'll see template markup instead of strings it should generate.

Expected behavior

Template markup should be processed and it should generate strings in place of variables.

Screenshots

Addon configuration:
Screenshot from 2022-03-03 09-35-31

Repository maintenance page:
Screenshot from 2022-03-03 09-35-49

GitLab MR:
Screenshot from 2022-03-03 09-36-29

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

@nijel
Copy link
Member

nijel commented Mar 3, 2022

The documentation is wrong in this case, it was never supported here.

Also, language-specific variables (for example {{ filename }}) cannot work here because squashing merges commits across translations.

@nijel nijel added enhancement Adding or requesting a new feature. backlog This is not on the Weblate roadmap for now. Can be prioritized by sponsorship. labels Mar 3, 2022
@github-actions
Copy link

github-actions bot commented Mar 3, 2022

This issue has been added to the backlog. It is not scheduled on the Weblate roadmap, but it eventually might be implemented.

In case you need this feature soon, please consider helping or push it by funding the development.

@JacekJagosz
Copy link

I think the template for the commit message plugin, when you are configuring it for the first time is still wrong, same as it was those 1.5 years ago.

@nijel
Copy link
Member

nijel commented Dec 12, 2023

@JacekJagosz There is no mention of template support there. Can you please clarify what is wrong?

@JacekJagosz
Copy link

When you first set this addon up, the default commit message is:

Translated using Weblate ({{ language_name }})

Currently translated at {{ stats.translated_percent }}% ({{ stats.translated }} of {{ stats.all }} strings)

Translation: {{ project_name }}/{{ component_name }}
Translate-URL: {{ url }}

And the markdown in it is broken, so it looks like this in git when you commit something.
obraz

My suggestion is to remove markdown from the default commit message that appears when you set this plugin up.

@nijel
Copy link
Member

nijel commented Dec 12, 2023

That is definitely not the default. The default is a blank string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog This is not on the Weblate roadmap for now. Can be prioritized by sponsorship. enhancement Adding or requesting a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants