Skip to content

Commit

Permalink
2024-01-06
Browse files Browse the repository at this point in the history
- Add support for translation2 in numbers.xml
  • Loading branch information
Daaaav committed Jan 6, 2024
1 parent c583a45 commit a7850e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ The .bas files are in the repo itself both for interest, and to provide diffs/co

# Changelog

2024-01-06
- Add support for translation2 in numbers.xml

2023-10-08
- Replace Scripting.FileSystemObject (FSO) by ADODB.Stream to fix file encodings getting messed up on some systems, likely Japanese ones in particular (thanks KabanFriends!)
- Don't convert `` to `...` for CJK languages (the sanitization is done because Excel unwantedly converts three dots to a single ellipsis character, but Chinese and Japanese actually intentionally use it)
Expand Down
2 changes: 1 addition & 1 deletion export.bas
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Sub export_simple(file As String)
value = ListRow_get(row, col.name)

If (file = "strings.xml" And (key = "case" Or key = "max" Or key = "max_local") And value = "") _
Or (file = "numbers.xml" And (key = "english" Or key = "translation") And ListRow_get(row, "english") = "") Then
Or (file = "numbers.xml" And (key = "english" Or key = "translation" Or key = "translation2") And ListRow_get(row, "english") = "") Then
' Don't include this attribute
Else
Set attr = XDoc.createAttribute(key)
Expand Down
3 changes: 2 additions & 1 deletion import.bas
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,13 @@ Sub import_simple(file As String)
schema(5) = "max_local"
End If
ElseIf file = "numbers.xml" Then
schema_max = 3
schema_max = 4
ReDim schema(schema_max)
schema(0) = "value"
schema(1) = "form"
schema(2) = "english"
schema(3) = "translation"
schema(4) = "translation2"
ElseIf file = "roomnames.xml" Then
schema_max = 4
ReDim schema(schema_max)
Expand Down

0 comments on commit a7850e2

Please sign in to comment.