The template parsing of the Sync fork prompt bar is abnormal in Chinese #14270

Closed
opened 2025-11-02 11:08:07 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @imkuang on GitHub (Mar 18, 2025).

Description

When there is a difference between the forked repo and the upstream repo, Gitea will display a Sync fork prompt.
I noticed that in some repo, there is a suspected template parsing error in the Chinese prompt, for example:

Image

If I switch the language to English the problem does not exist, I guess it might be a bug in the translation template?

Image

The problem does not seem to occur in all repositories and all branches, but I can definitely reproduce the problem by doing the following:

  1. Mirror the openwrt repo ( https://git.openwrt.org/openwrt/openwrt.git ) to an Organization
  2. Fork it to your own account
  3. Create new branch from openwrt-24.10, then you will be able to see this error on the newly created branch (remember to switch the language to Chinese)

Gitea Version

1.23.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Debian

How are you running Gitea?

Official Docker image

Database

SQLite

Originally created by @imkuang on GitHub (Mar 18, 2025). ### Description When there is a difference between the forked repo and the upstream repo, Gitea will display a Sync fork prompt. I noticed that in some repo, there is a suspected template parsing error in the Chinese prompt, for example: ![Image](https://github.com/user-attachments/assets/12ee2ca2-9ed7-4b76-8e9c-128e5862abb2) If I switch the language to English the problem does not exist, I guess it might be a bug in the translation template? ![Image](https://github.com/user-attachments/assets/f12a577f-64e7-415c-9daa-1e8cd4f7e36b) The problem does not seem to occur in all repositories and all branches, but I can definitely reproduce the problem by doing the following: 1. Mirror the openwrt repo ( https://git.openwrt.org/openwrt/openwrt.git ) to an Organization 2. Fork it to your own account 3. Create new branch from `openwrt-24.10`, then you will be able to see this error on the newly created branch (remember to switch the language to Chinese) ### Gitea Version 1.23.5 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Debian ### How are you running Gitea? Official Docker image ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 11:08:07 -06:00
Author
Owner

@imkuang commented on GitHub (Mar 18, 2025):

Maybe we should backport this translation commit: 02c64e48b7

@wxiaoguang The correct translation merged to main branch seems to be only a few days behind your this backport: e98dd6ee5b
Maybe we need an additional backport?

@imkuang commented on GitHub (Mar 18, 2025): Maybe we should backport this translation commit: https://github.com/go-gitea/gitea/commit/02c64e48b7421e68d264163253318aacb6fb2f3d @wxiaoguang The correct translation merged to main branch seems to be only a few days behind your this backport: https://github.com/go-gitea/gitea/commit/e98dd6ee5b0efb8e7a9f992fa35903cf5b2c1634 Maybe we need an additional backport?
Author
Owner

@imkuang commented on GitHub (Mar 18, 2025):

The translation of the 1.23 branch did not handle the order of arguments correctly, which was fixed in the commit of the above mian branch
Image

Image

@imkuang commented on GitHub (Mar 18, 2025): The translation of the 1.23 branch did not handle the order of arguments correctly, which was fixed in the commit of the above mian branch ![Image](https://github.com/user-attachments/assets/4624b719-947c-466d-b107-814b417b429a) ![Image](https://github.com/user-attachments/assets/670b6748-bb1b-4d02-a5fd-e963b108c190)
Author
Owner

@wxiaoguang commented on GitHub (Mar 18, 2025):

Similar to this one: https://github.com/go-gitea/gitea/pull/32937#discussion_r1894592525

It seems that no maintainer is interested to document it or regularly check the locales, so it happens again and again .....


By the way, unusually PRs with locale changes won't be backported. This "Sync fork" related PRs are special and quite important, so the PRs were backported, but the locales went wrong.

@wxiaoguang commented on GitHub (Mar 18, 2025): Similar to this one: https://github.com/go-gitea/gitea/pull/32937#discussion_r1894592525 It seems that no maintainer is interested to document it or regularly check the locales, so it happens again and again ..... --- By the way, unusually PRs with locale changes won't be backported. This "Sync fork" related PRs are special and quite important, so the PRs were backported, but the locales went wrong.
Author
Owner

@wxiaoguang commented on GitHub (Mar 18, 2025):

-> Fix incorrect 1.23 translations #33932

@wxiaoguang commented on GitHub (Mar 18, 2025): -> Fix incorrect 1.23 translations #33932
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14270