Skip to content

Semicolons in locale_en-US.ini #23814

@kzmi

Description

@kzmi
Contributor

Description

There is an issue with the locale_en-US.ini file where the following four keys contain semicolons:

  • settings.protect_protected_file_patterns
  • settings.protect_protected_file_patterns_desc
  • settings.protect_unprotected_file_patterns
  • settings.protect_unprotected_file_patterns_desc

The semicolons are causing problems because Crowdin treats a semicolon as the beginning of a comment:

image

This leads to the following issues:

  • The part of the text after the semicolon cannot be translated.
  • Crowdin appends the original comment to the end of the translation. (see locale_zh-CN.ini)

It may be possible to enclose the text in double quotes to prevent Crowdin from treating the semicolon as a comment.

Gitea Version

265675a

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Database

None

Activity

added this to the 1.19.1 milestone on Mar 30, 2023
lunny

lunny commented on Mar 30, 2023

@lunny
Member

I think most of the translations have the same problems. Maybe we need some translations lint when pushing.

wxiaoguang

wxiaoguang commented on Mar 30, 2023

@wxiaoguang
Contributor

I have removed most semicolons in en-US.ini. Those are the last four. Luckily, these four doesn't break the translations too much, it only causes that part of the sentence doesn't get translated.

This time I will do a quick patch , try to use \; as before, or try to see if " works for both (crowdin & Gitea)

Next time I will propose a complete PR.

added a commit that references this issue on Mar 31, 2023
288c2e8
wxiaoguang

wxiaoguang commented on Mar 31, 2023

@wxiaoguang
Contributor

A hint: I guess we couldn't do settings.protect_protected_file_patterns=`"... '\;' ... " ;'):`` (eg: the last commit )

#23819 uses key="x='y'; z" , I guess it should work well for both Gitea and Crowdin. Let's wait for next sync.

locked and limited conversation to collaborators on May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Participants

      @lunny@wxiaoguang@kzmi

      Issue actions

        Semicolons in locale_en-US.ini · Issue #23814 · go-gitea/gitea