-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: Italian game language support (OCR + language list) #3399
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
base: main
Are you sure you want to change the base?
Changes from all commits
3ce5b15
60d7fab
b5fd30b
bf840ae
f0bbaee
4662754
1720f78
f104f0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,183 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <root> | ||
| <!-- | ||
| Microsoft ResX Schema | ||
|
|
||
| Version 2.0 | ||
|
|
||
| The primary goals of this format is to allow a simple XML format | ||
| that is mostly human readable. The generation and parsing of the | ||
| various data types are done through the TypeConverter classes | ||
| associated with the data types. | ||
|
|
||
| Example: | ||
|
|
||
| ... ado.net/XML headers & schema ... | ||
| <resheader name="resmimetype">text/microsoft-resx</resheader> | ||
| <resheader name="version">2.0</resheader> | ||
| <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | ||
| <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | ||
| <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | ||
| <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | ||
| <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | ||
| <value>[base64 mime encoded serialized .NET Framework object]</value> | ||
| </data> | ||
| <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | ||
| <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | ||
| <comment>This is a comment</comment> | ||
| </data> | ||
|
|
||
| There are any number of "resheader" rows that contain simple | ||
| name/value pairs. | ||
|
|
||
| Each data row contains a name, and value. The row also contains a | ||
| type or mimetype. Type corresponds to a .NET class that support | ||
| text/value conversion through the TypeConverter architecture. | ||
| Classes that don't support this are serialized and stored with the | ||
| mimetype set. | ||
|
|
||
| The mimetype is used for serialized objects, and tells the | ||
| ResXResourceReader how to depersist the object. This is currently not | ||
| extensible. For a given mimetype the value must be set accordingly: | ||
|
|
||
| Note - application/x-microsoft.net.object.binary.base64 is the format | ||
| that the ResXResourceWriter will generate, however the reader can | ||
| read any of the formats listed below. | ||
|
|
||
| mimetype: application/x-microsoft.net.object.binary.base64 | ||
| value : The object must be serialized with | ||
| : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | ||
| : and then encoded with base64 encoding. | ||
|
|
||
| mimetype: application/x-microsoft.net.object.soap.base64 | ||
| value : The object must be serialized with | ||
| : System.Runtime.Serialization.Formatters.Soap.SoapFormatter | ||
| : and then encoded with base64 encoding. | ||
|
|
||
| mimetype: application/x-microsoft.net.object.bytearray.base64 | ||
| value : The object must be serialized into a byte array | ||
| : using a System.ComponentModel.TypeConverter | ||
| : and then encoded with base64 encoding. | ||
| --> | ||
| <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | ||
| <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | ||
| <xsd:element name="root" msdata:IsDataSet="true"> | ||
| <xsd:complexType> | ||
| <xsd:choice maxOccurs="unbounded"> | ||
| <xsd:element name="metadata"> | ||
| <xsd:complexType> | ||
| <xsd:sequence> | ||
| <xsd:element name="value" type="xsd:string" minOccurs="0" /> | ||
| </xsd:sequence> | ||
| <xsd:attribute name="name" use="required" type="xsd:string" /> | ||
| <xsd:attribute name="type" type="xsd:string" /> | ||
| <xsd:attribute name="mimetype" type="xsd:string" /> | ||
| <xsd:attribute ref="xml:space" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| <xsd:element name="assembly"> | ||
| <xsd:complexType> | ||
| <xsd:attribute name="alias" type="xsd:string" /> | ||
| <xsd:attribute name="name" type="xsd:string" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| <xsd:element name="data"> | ||
| <xsd:complexType> | ||
| <xsd:sequence> | ||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
| <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | ||
| </xsd:sequence> | ||
| <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | ||
| <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | ||
| <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | ||
| <xsd:attribute ref="xml:space" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| <xsd:element name="resheader"> | ||
| <xsd:complexType> | ||
| <xsd:sequence> | ||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
| </xsd:sequence> | ||
| <xsd:attribute name="name" type="xsd:string" use="required" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| </xsd:choice> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| </xsd:schema> | ||
| <resheader name="resmimetype"> | ||
| <value>text/microsoft-resx</value> | ||
| </resheader> | ||
| <resheader name="version"> | ||
| <value>2.0</value> | ||
| </resheader> | ||
| <resheader name="reader"> | ||
| <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
| </resheader> | ||
| <resheader name="writer"> | ||
| <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
| </resheader> | ||
| <data name="1星圣遗物" xml:space="preserve"> | ||
| <value>Manufatti.*da.*1★?</value> | ||
| </data> | ||
| <data name="2星圣遗物" xml:space="preserve"> | ||
| <value>Manufatti.*da.*2★?</value> | ||
| </data> | ||
| <data name="3星圣遗物" xml:space="preserve"> | ||
| <value>Manufatti.*da.*3★?</value> | ||
| </data> | ||
| <data name="4星圣遗物" xml:space="preserve"> | ||
| <value>Manufatti.*da.*4★?</value> | ||
| </data> | ||
| <data name="元素充能效率" xml:space="preserve"> | ||
| <value>Ricarica di energia</value> | ||
| </data> | ||
| <data name="元素精通" xml:space="preserve"> | ||
| <value>Maestria elementale</value> | ||
| </data> | ||
| <data name="冰元素伤害加成" xml:space="preserve"> | ||
| <value>Bonus DAN da Cryo</value> | ||
| </data> | ||
| <data name="岩元素伤害加成" xml:space="preserve"> | ||
| <value>Bonus DAN da Geo</value> | ||
| </data> | ||
| <data name="快速选择" xml:space="preserve"> | ||
| <value>Selezione.*rapida</value> | ||
| </data> | ||
| <data name="攻击力" xml:space="preserve"> | ||
| <value>ATT</value> | ||
| </data> | ||
| <data name="暴击伤害" xml:space="preserve"> | ||
| <value>DAN da CRIT</value> | ||
| </data> | ||
| <data name="暴击率" xml:space="preserve"> | ||
| <value>Tasso di CRIT</value> | ||
| </data> | ||
| <data name="水元素伤害加成" xml:space="preserve"> | ||
| <value>Bonus DAN da Hydro</value> | ||
| </data> | ||
| <data name="治疗加成" xml:space="preserve"> | ||
| <value>Bonus di guarigione</value> | ||
| </data> | ||
| <data name="火元素伤害加成" xml:space="preserve"> | ||
| <value>Bonus DAN da Pyro</value> | ||
| </data> | ||
| <data name="物理伤害加成" xml:space="preserve"> | ||
| <value>Bonus DAN fisici</value> | ||
| </data> | ||
| <data name="生命值" xml:space="preserve"> | ||
| <value>PS</value> | ||
| </data> | ||
| <data name="草元素伤害加成" xml:space="preserve"> | ||
| <value>Bonus DAN da Dendro</value> | ||
| </data> | ||
| <data name="防御力" xml:space="preserve"> | ||
| <value>DIF</value> | ||
| </data> | ||
| <data name="雷元素伤害加成" xml:space="preserve"> | ||
| <value>Bonus DAN da Electro</value> | ||
| </data> | ||
| <data name="风元素伤害加成" xml:space="preserve"> | ||
| <value>Bonus DAN da Anemo</value> | ||
| </data> | ||
| </root> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,144 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <root> | ||
| <!-- | ||
| Microsoft ResX Schema | ||
|
|
||
| Version 2.0 | ||
|
|
||
| The primary goals of this format is to allow a simple XML format | ||
| that is mostly human readable. The generation and parsing of the | ||
| various data types are done through the TypeConverter classes | ||
| associated with the data types. | ||
|
|
||
| Example: | ||
|
|
||
| ... ado.net/XML headers & schema ... | ||
| <resheader name="resmimetype">text/microsoft-resx</resheader> | ||
| <resheader name="version">2.0</resheader> | ||
| <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | ||
| <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | ||
| <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | ||
| <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | ||
| <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | ||
| <value>[base64 mime encoded serialized .NET Framework object]</value> | ||
| </data> | ||
| <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | ||
| <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | ||
| <comment>This is a comment</comment> | ||
| </data> | ||
|
|
||
| There are any number of "resheader" rows that contain simple | ||
| name/value pairs. | ||
|
|
||
| Each data row contains a name, and value. The row also contains a | ||
| type or mimetype. Type corresponds to a .NET class that support | ||
| text/value conversion through the TypeConverter architecture. | ||
| Classes that don't support this are serialized and stored with the | ||
| mimetype set. | ||
|
|
||
| The mimetype is used for serialized objects, and tells the | ||
| ResXResourceReader how to depersist the object. This is currently not | ||
| extensible. For a given mimetype the value must be set accordingly: | ||
|
|
||
| Note - application/x-microsoft.net.object.binary.base64 is the format | ||
| that the ResXResourceWriter will generate, however the reader can | ||
| read any of the formats listed below. | ||
|
|
||
| mimetype: application/x-microsoft.net.object.binary.base64 | ||
| value : The object must be serialized with | ||
| : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | ||
| : and then encoded with base64 encoding. | ||
|
|
||
| mimetype: application/x-microsoft.net.object.soap.base64 | ||
| value : The object must be serialized with | ||
| : System.Runtime.Serialization.Formatters.Soap.SoapFormatter | ||
| : and then encoded with base64 encoding. | ||
|
|
||
| mimetype: application/x-microsoft.net.object.bytearray.base64 | ||
| value : The object must be serialized into a byte array | ||
| : using a System.ComponentModel.TypeConverter | ||
| : and then encoded with base64 encoding. | ||
| --> | ||
| <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | ||
| <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | ||
| <xsd:element name="root" msdata:IsDataSet="true"> | ||
| <xsd:complexType> | ||
| <xsd:choice maxOccurs="unbounded"> | ||
| <xsd:element name="metadata"> | ||
| <xsd:complexType> | ||
| <xsd:sequence> | ||
| <xsd:element name="value" type="xsd:string" minOccurs="0" /> | ||
| </xsd:sequence> | ||
| <xsd:attribute name="name" use="required" type="xsd:string" /> | ||
| <xsd:attribute name="type" type="xsd:string" /> | ||
| <xsd:attribute name="mimetype" type="xsd:string" /> | ||
| <xsd:attribute ref="xml:space" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| <xsd:element name="assembly"> | ||
| <xsd:complexType> | ||
| <xsd:attribute name="alias" type="xsd:string" /> | ||
| <xsd:attribute name="name" type="xsd:string" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| <xsd:element name="data"> | ||
| <xsd:complexType> | ||
| <xsd:sequence> | ||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
| <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | ||
| </xsd:sequence> | ||
| <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | ||
| <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | ||
| <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | ||
| <xsd:attribute ref="xml:space" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| <xsd:element name="resheader"> | ||
| <xsd:complexType> | ||
| <xsd:sequence> | ||
| <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
| </xsd:sequence> | ||
| <xsd:attribute name="name" type="xsd:string" use="required" /> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| </xsd:choice> | ||
| </xsd:complexType> | ||
| </xsd:element> | ||
| </xsd:schema> | ||
| <resheader name="resmimetype"> | ||
| <value>text/microsoft-resx</value> | ||
| </resheader> | ||
| <resheader name="version"> | ||
| <value>2.0</value> | ||
| </resheader> | ||
| <resheader name="reader"> | ||
| <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
| </resheader> | ||
| <resheader name="writer"> | ||
| <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
| </resheader> | ||
| <data name="地脉异常" xml:space="preserve"> | ||
| <value>Anomalia.*geomantica</value> | ||
| </data> | ||
| <data name="挑战达成" xml:space="preserve"> | ||
| <value>(Sfida|completata)</value> | ||
| </data> | ||
| <data name="点击任意位置关闭" xml:space="preserve"> | ||
| <value>(Fai clic|Tocca|Premi).*per chiudere</value> | ||
| </data> | ||
| <data name="自动退出" xml:space="preserve"> | ||
| <value>Esci</value> | ||
| </data> | ||
| <data name="跳过" xml:space="preserve"> | ||
| <value>Salta</value> | ||
| </data> | ||
| <data name="快速编队" xml:space="preserve"> | ||
| <value>Configurazione rapida</value> | ||
|
Comment on lines
+135
to
+136
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 严重程度:P2。问题位置: Useful? React with 👍 / 👎.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed, but same as the CheckRewardsTask case: AutoDomainTask.cs:111-118 (GetConfirmRa for '开始挑战' / '单人挑战') hardcodes the Chinese OCR targets in the code itself, and no non-Chinese locale (fr/en included) provides them — a pre-existing gap in the multi-language system, not introduced by this PR. Fixing it properly means refactoring those call sites plus adding keys for every language, which I'll leave for a follow-up PR. |
||
| </data> | ||
| <data name="限时开放" xml:space="preserve"> | ||
| <value>Disponibile.*per.*un.*periodo.*limitato</value> | ||
| </data> | ||
| <data name="限时全部开放" xml:space="preserve"> | ||
| <value>Accesso.*completo.*a.*tempo.*limitato</value> | ||
| </data> | ||
| </root> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
严重程度:P2。问题位置:
AutoDomainTask.it.resx的意大利语资源列表只到这些基础 OCR 文案;问题原因:AutoDomainTask构造函数还会读取限时全部开放/限时开放,并在秘境入口用Regex.IsMatch判断是否处于限时全开状态,缺少 Italian 资源时IStringLocalizer会回落成中文 key。可能造成的影响:当游戏语言设为 Italian 且秘境在非周日的“限时全部开放”活动状态下运行自动秘境时,检测不到 all-open,后续不会按SundaySelectedValue选择奖励,可能刷错材料。推荐修复方案:为限时全部开放和限时开放增加意大利语 OCR 正则(必要时也补齐已声明的匹配挑战/快速编队)。Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in f0bbaee: added 快速编队 ("Configurazione rapida", single unambiguous TextMap hash, matches the button label used elsewhere in the repo) and both 限时开放/限时全部开放 ("Disponibile per un periodo limitato" / "Accesso completo a tempo limitato", the latter derived from the 限时全部开放:{0} variant with the placeholder stripped). 匹配挑战 was left out: TextMap gives two different Italian translations across its 3 CHS-exact hashes ("Matchmaking" 2/3 vs "Cooperativa" 1/3, FR uses "Matchmaking" for all 3 so it doesn't disambiguate), so no univocal source string — didn't want to guess. Also note matchingChallengeString/rapidformationString aren't referenced anywhere in AutoDomainTask.cs beyond the constructor, so this is currently a dead field with no runtime impact; happy to add 匹配挑战 in a follow-up once someone can confirm in-game which of the two candidates is shown.