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

l10n: zh_CN: for git 2.46 rounds #783

Closed
wants to merge 1 commit into from

Conversation

dyrone
Copy link

@dyrone dyrone commented Jul 18, 2024

No description provided.

Copy link

github-actions bot commented Jul 18, 2024

Warnings found by git-po-helper in workflow #780:

------------------------------------------------------------------------------
INFO [po/zh_CN.po@d886f4a]	5733 translated messages, 1 fuzzy translation. 
------------------------------------------------------------------------------
WARNING [po/zh_CN.po@d886f4a]	mismatched patterns: http.cookiefile 
WARNING [po/zh_CN.po@d886f4a]	>> msgid: ignoring http.savecookies for empty http.cookiefile 
WARNING [po/zh_CN.po@d886f4a]	>> msgstr: 因为 http.savecookies 为空,忽略 http.savecookies 
WARNING [po/zh_CN.po@d886f4a]                        
INFO checking commits: 1 passed.                  
------------------------------------------------------------------------------
INFO downloading pot file from https://github.com/git-l10n/pot-changes/raw/pot/master/po/git.pot 
------------------------------------------------------------------------------
WARNING [po/zh_CN.po@d886f4a]	1 fuzzy string(s) in your 'po/XX.po' 
WARNING [po/zh_CN.po@d886f4a]                        
WARNING [po/zh_CN.po@d886f4a]	  > po/XX.po:26596: this message needs to be reviewed by the translator 
WARNING [po/zh_CN.po@d886f4a]                        

@dyrone dyrone force-pushed the tl/zh_CN_2.46.0_rnd branch 6 times, most recently from c98ac03 to 4a2cda0 Compare July 27, 2024 14:50
@dyrone dyrone marked this pull request as ready for review July 27, 2024 15:32
@dyrone dyrone force-pushed the tl/zh_CN_2.46.0_rnd branch from 4a2cda0 to abaf6ae Compare July 27, 2024 16:32
@jiangxin
Copy link
Member

+#. TRANSLATORS: 'edit', 'merge -C' and 'break' should
+#. not be translated.
+#.
+msgid ""
+"'edit' does not take a merge commit. If you wanted to\n"
+"replay the merge, use 'merge -C' on the commit, and then\n"
+"'break' to give the control back to you so that you can\n"
+"do 'git commit --amend && git rebase --continue'."
+msgstr ""
+"'edit”' 不接受合并提交。如果您想要重播合并,请在提交上使用 'merge -C',然后使用\n"
+"'break' 将控制权交还给您,以便您可以执行 'git commit --amend && git rebase --continue'。"
+

请参考原文进行折行。

@jiangxin
Copy link
Member

+#. TRANSLATORS: 'pick' and 'merge -C' should not be
+#. translated.
+#.
+msgid ""
+"'pick' does not take a merge commit. If you wanted to\n"
+"replay the merge, use 'merge -C' on the commit."
+msgstr "'pick' 不接受合并提交。如果您想要重放合并,请在提交上使用 'merge -C'。"

折行。

@jiangxin
Copy link
Member

+#. TRANSLATORS: 'reword' and 'merge -c' should not be
+#. translated.
+#.
+msgid ""
+"'reword' does not take a merge commit. If you wanted to\n"
+"replay the merge and reword the commit message, use\n"
+"'merge -c' on the commit"
+msgstr ""
+"'reword' 不接受合并提交。如果您想重放合并并重写提交\n"
+"消息,请在提交上使用 'merge -c'"
+

参考原文长度,可以在逗号后折行。

@jiangxin
Copy link
Member

+msgid "could not write commit message file"
+msgstr "无法写入提交消息文件"

在术语表有 commit message,遵照术语表的翻译。

@jiangxin
Copy link
Member

jiangxin commented Jul 28, 2024

+#, c-format
+msgid "expected '%.*s' in submodule path '%s' not to be a symbolic link"
+msgstr "期望 '%.*s' 不是子模组路径 '%s' 中的符号链接"

这里翻译的有问题。要看下源码 submodule.c :

2317 int validate_submodule_path(const char *path)
2318 {
2319         char *p = xstrdup(path);
2320         struct stat st;
2321         int i, ret = 0;
2322         char sep;
2323 
2324         for (i = 0; !ret && p[i]; i++) {
2325                 if (!is_dir_sep(p[i]))
2326                         continue;
2327 
2328                 sep = p[i];
2329                 p[i] = '\0';
2330                 /* allow missing components, but no symlinks */
2331                 ret = lstat(p, &st) || !S_ISLNK(st.st_mode) ? 0 : -1;
2332                 p[i] = sep;
2333                 if (ret)
2334                         error(_("expected '%.*s' in submodule path '%s' not to "
2335                                 "be a symbolic link"), i, p, p);
2336         }
2337         if (!lstat(p, &st) && S_ISLNK(st.st_mode))
2338                 ret = error(_("expected submodule path '%s' not to be a "
2339                               "symbolic link"), p);
2340         free(p);
2341         return ret;
2342 }

第 2337~2339 行是判断整个 submodule 路径不能是符号链接。而 2324~2336 是依次判断 submodule 的各个父目录不能是符号链接

@jiangxin
Copy link
Member

+msgid "git config [<file-option>] --get-colorbool <name> [<stdout-is-tty>]"
+msgstr "git config [<文件选项>] --get-colorbool <名称> [<标准输出为 tty>]"

原文占位符中为避免出现空格,用 -,翻译的内容也不要出现空格。

@jiangxin
Copy link
Member

jiangxin commented Jul 28, 2024

+msgid "ignoring http.savecookies for empty http.cookiefile"
+msgstr "忽略空 http.cookiefile 的 http.savecookies"

"因为 http.savecookies 为空,忽略 http.savecookies"

@jiangxin
Copy link
Member

+msgid "refusing to force and skip creation of reflog"
+msgstr "拒绝强制并跳过创建引用日志"

源代码:

        if ((flags & REF_FORCE_CREATE_REFLOG) &&
            (flags & REF_SKIP_CREATE_REFLOG)) {
                strbuf_addstr(err, _("refusing to force and skip creation of reflog"));
                return -1;
        }

"拒绝既强制又跳过创建引用日志"

@jiangxin
Copy link
Member

+#, c-format
+msgid "repository already uses '%s' format"
+msgstr "存储库已使用 '%s' 格式"

看下术语表。

@jiangxin
Copy link
Member

jiangxin commented Jul 28, 2024

+msgid "rfc"
+msgstr "rfc 补丁"

出现在 git-format-patch 帮助中:

用法:git format-patch [<选项>] [<从> | <版本范围>]                                                                                
                                                                                                                                   
     ... ...                                                                               
    --[no-]rfc[=<rfc 补丁>]                                                                                                        
                          在 'PATCH' 之前添加 <rfc> (默认为 'RFC')

不如翻译为 "RFC",即:

    --[no-]rfc[=<RFC>]                                                                                                        
                          在 'PATCH' 之前添加 <RFC> (默认为 'RFC')

@jiangxin
Copy link
Member

jiangxin commented Jul 28, 2024

+msgid "Only one letter is expected, got '%s'"
+msgstr "预计只有一个字母,得到 '%s'"
+

预计是 estimated, 预期是 expected

@jiangxin
Copy link
Member

-#: ident.c
 msgid ""
 "\n"
 "*** Please tell me who you are.\n"
@@ -206,7 +203,6 @@ msgstr ""
 "来设置您账号的缺省身份标识。\n"
 "如果仅在本仓库设置身份标识,则省略 --global 参数。\n"
 
-#: branch.c
 msgid ""
 "\n"
 "After fixing the error cause you may try to fix up\n"
@@ -215,7 +211,6 @@ msgstr ""
 "\n"
 "在修复错误后,您可以通过执行以下命令来尝试修改远程跟踪分支:"
 
-#: rebase-interactive.c
 msgid ""
 "\n"
 "Commands:\n"
@@ -266,7 +261,6 @@ msgstr ""
 "\n"
 "可以对这些行重新排序,将从上至下执行。\n"

每个条目上的注释有三种风格:"filename + location", "filename", 空。
早期使用默认值 "filename+location" 导致 po 文件变更大,仓库数据压缩率低。现在要求每个语言自行决定风格: "filename" 或者空白都可以提升压缩率。选择好之后,每个语言要稳定,不要来回在不同风格之间横跳。team leader 自己开发一些脚本做保障,我并不是每次都能兜住底。

@dyrone dyrone force-pushed the tl/zh_CN_2.46.0_rnd branch 5 times, most recently from 0c58b1a to e9ebc3e Compare July 28, 2024 03:44
po/zh_CN.po Outdated Show resolved Hide resolved
po/zh_CN.po Outdated Show resolved Hide resolved
po/zh_CN.po Outdated Show resolved Hide resolved
po/zh_CN.po Outdated Show resolved Hide resolved
po/zh_CN.po Outdated Show resolved Hide resolved
po/zh_CN.po Outdated Show resolved Hide resolved
po/zh_CN.po Outdated Show resolved Hide resolved
po/zh_CN.po Outdated Show resolved Hide resolved
Signed-off-by: Teng Long <dyroneteng@gmail.com>
Co-authored-by: 依云 <lilydjwg@gmail.com>
Reviewed-by: 依云 <lilydjwg@gmail.com>
Reviewed-by: Jiang Xin <worldhello.net@gmail.com>
@dyrone dyrone force-pushed the tl/zh_CN_2.46.0_rnd branch from 4087261 to d886f4a Compare July 28, 2024 11:26
@jiangxin
Copy link
Member

image

@jiangxin
Copy link
Member

Your commit has been cherry-picked to master branch. See changes below:

1:  d886f4a34a ! 1:  de86879ace l10n: zh_CN: for git 2.46 rounds
    @@ Metadata
     Author: Teng Long <dyroneteng@gmail.com>
     
      ## Commit message ##
    -    l10n: zh_CN: for git 2.46 rounds
    +    l10n: zh_CN: updated translation for 2.46
     
         Signed-off-by: Teng Long <dyroneteng@gmail.com>
         Co-authored-by: 依云 <lilydjwg@gmail.com>
         Reviewed-by: 依云 <lilydjwg@gmail.com>
    -    Reviewed-by: Jiang Xin <worldhello.net@gmail.com>
    +    Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
     
      ## po/zh_CN.po ##
     @@ po/zh_CN.po: msgid ""
    @@ po/zh_CN.po: msgid ""
     -"POT-Creation-Date: 2024-04-28 19:59+0800\n"
     -"PO-Revision-Date: 2024-04-28 20:31+0800\n"
     +"POT-Creation-Date: 2024-07-27 22:28+0800\n"
    -+"PO-Revision-Date: 2024-07-28 11:43+0800\n"
    ++"PO-Revision-Date: 2024-07-28 19:52+0800\n"
      "Last-Translator: Teng Long <dyroneteng@gmail.com>\n"
      "Language-Team: GitHub <https://github.com/dyrone/git/>\n"
      "Language: zh_CN\n"
    @@ po/zh_CN.po: msgstr "展开别名命令 '%s' 失败,'%s' 不是一个 git 命
      msgstr "预期 %%(trailers:key=<值>)"
      
     +#: submodule.c
    -+#, fuzzy, c-format
    ++#, c-format
     +msgid "expected '%.*s' in submodule path '%s' not to be a symbolic link"
     +msgstr "期望子模组的父目录 '%.*s' 不是一个符号链接,子模组路径为 '%s'"
     +
    @@ po/zh_CN.po: msgstr "忽略悬空符号引用 %s"
      
     +#: http.c
     +msgid "ignoring http.savecookies for empty http.cookiefile"
    -+msgstr "因为 http.savecookies 为空,忽略 http.savecookies"
    ++msgstr "因为 http.cookiefile 为空,忽略 http.savecookies"
     +
      #: builtin/rebase.c
      #, c-format

@jiangxin jiangxin closed this Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants