【问题标题】:xcode localization - not all translation importedxcode 本地化 - 并非所有翻译都导入
【发布时间】:2016-01-07 00:01:09
【问题描述】:

我在导入 xliff 文件时遇到了一些奇怪的问题。我的代码中的一些故事板字符串和字符串都没有导入,即使它们在 xliff 文件中。

她是我的xliff:

 <body>
        <trans-unit id="Athenticate for login">
            <source>Athenticate for login</source>
            <note>No comment provided by engineer.</note>
            <target>Autentisering for innlogging</target>
        </trans-unit>
        <trans-unit id="Attempts left: ">
            <source>Attempts left:</source>
            <note>No comment provided by engineer.</note>
            <target>Forsøk igjen: </target>
        </trans-unit>
        <trans-unit id="Wrong PIN-code. Try again">
            <source>Wrong PIN-code. Try again</source>
            <note>Message displayed when user enter wrong PIN-code</note>
            <target>Feil PIN kode. Forsøk igjen</target>
        </trans-unit>
    </body>

这是我的 localizable.strings

/* No comment provided by engineer. */
"Athenticate for login" = "Autentisering for innlogging";

/* Message displayed when user enter wrong PIN-code */
"Wrong PIN-code. Try again" = "Feil PIN kode. Forsøk igjen";

如您所见,“Attempts left”被排除在外......

有人知道为什么吗? (故事板中的一些字符串也被省略了)

谢谢..

【问题讨论】:

    标签: xcode localization


    【解决方案1】:

    问题可能是在您的 XLIFF 中,“Attempts left”的 ID 和源文本不同:ID 有一个尾随空格,源文本已经在冒号后结束。尝试在 XLIFF 源内容中添加空格,然后查看导入是否有效。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多