Compare commits

..
2 Commits
Author SHA1 Message Date
yyc12345 f8d653c7bd feat: add example for RC file 2026-09-14 10:13:47 +08:00
yyc12345 3454d5cfe5 chore: disable formatter for lcid map 2026-09-14 10:03:50 +08:00
3 changed files with 77 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
#pragma code_page(65001)
// ---------------------------
// String tables
// ---------------------------
{% for lang in languages %}// {{ lang.name }}
LANGUAGE {{ lang.primary }}, {{ lang.sublanguage }}
STRINGTABLE
BEGIN
{% for i in (1000..1002) %}
{% assign key = i | to_string %}
{% assign s = lang.named[key] %}
{{ s.key }} "{{ s.text | rc_escape }}" // {{ s.comment }}
{% endfor %}
END
{% endfor %}
// ---------------------------
// Version information
// ---------------------------
1 VERSIONINFO
FILEVERSION 1, 0, 0, 0
PRODUCTVERSION 1, 0, 0, 0
FILEFLAGMASK 0x3fL
FILEFLAGS 0x0L
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
BEGIN
BLOCK "StringFileInfo"
BEGIN
{% for lang in languages %}
BLOCK "{{ lang.block_key }}"
BEGIN
VALUE "Comments", "https://github.com/SarasasChipWorkshop/metaglot"
VALUE "CompanyName", "Example"
VALUE "FileDescription", "{{ lang.named.file_description | rc_escape }}"
VALUE "FileVersion", "1.0.0.0"
VALUE "InternalName", "ppic"
VALUE "LegalCopyright", "MIT/Expat License - Copyright (C) 2026 Example"
VALUE "OriginalFilename", "ppic.exe"
VALUE "ProductName", "{{ lang.named.product_name | rc_escape }}"
VALUE "ProductVersion", "1.0.0.0"
END
{% endfor %}
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", {% for lang in languages %}{{ lang.langid }}, 1200{% unless forloop.last %}, {% endunless %}{% endfor %}
END
END
+23
View File
@@ -0,0 +1,23 @@
version = 1
[strings.1000]
msgid = "Pineapple Pictures - Image Viewer"
context = "Explorer" # Used by Explorer to show in panel.
comment = "File description of the executable."
[strings.1001]
msgid = "JPEG Image"
comment = "File type name for: jpg, jpeg, jfif"
[strings.1002]
msgid = "PNG Image"
comment = "File type name for: png"
[strings.file_description]
msgid = "Pineapple Pictures - Image Viewer"
context = "Self" # Used by file itself as its property.
comment = "File description of the executable."
[strings.product_name]
msgid = "Pineapple Pictures"
comment = "Display name of the product."
+2
View File
@@ -23,6 +23,7 @@ from ..langid import PoLang, WinLcid
# has 'qut' -> 0x0086 and marks 'quc' (0x0093), 'qut-GT' (0x0486) and
# 'quc-CO' (0x0493) as reserved. The section 2.2 registry wins here.
# fmt: off
_LCID_TAGS: dict[str, WinLcid] = {
"ar": WinLcid(0x0001),
"bg": WinLcid(0x0002),
@@ -480,6 +481,7 @@ _LCID_TAGS: dict[str, WinLcid] = {
"ku-Arab": WinLcid(0x7C92),
# "fr-015": WinLcid(0xE40C), # reserved
}
# fmt: on
# Gettext-style script designator words mapped to ISO 15924 script codes.