[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [libosinfo PATCHv2 8/9] win: Add language information to Windows medias



Now that libosinfo knows how to use the l10n-language OsinfoDB attribute,
we can add this data to the various Windows <media> definitions in
the database.
---
 configure.ac                   |   3 +-
 data/Makefile.am               |   2 +-
 data/datamaps/Makefile.am      |   7 +
 data/datamaps/windows-lang.xml | 309 +++++++++++++++++++++++++++++++++++++++++
 data/oses/windows.xml.in       |  19 ++-
 5 files changed, 337 insertions(+), 3 deletions(-)
 create mode 100644 data/datamaps/Makefile.am
 create mode 100644 data/datamaps/windows-lang.xml

diff --git a/configure.ac b/configure.ac
index 277ab33..c809469 100644
--- a/configure.ac
+++ b/configure.ac
@@ -184,10 +184,11 @@ AC_CONFIG_FILES([
 	osinfo/Makefile
 	osinfo/libosinfo-1.0.pc
 	data/Makefile
+	data/datamaps/Makefile
 	data/devices/Makefile
 	data/hypervisors/Makefile
-	data/oses/Makefile
 	data/install-scripts/Makefile
+	data/oses/Makefile
 	data/schemas/Makefile
 	tools/Makefile
 	test/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 589ce5b..747f0e9 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,5 +1,5 @@
 
-SUBDIRS = devices oses hypervisors schemas install-scripts
+SUBDIRS = datamaps devices oses hypervisors install-scripts schemas
 
 EXTRA_DIST = usb.ids pci.ids 95-osinfo.rules.in
 
diff --git a/data/datamaps/Makefile.am b/data/datamaps/Makefile.am
new file mode 100644
index 0000000..e02c295
--- /dev/null
+++ b/data/datamaps/Makefile.am
@@ -0,0 +1,7 @@
+
+datamapdir = $(pkgdatadir)/db/datamaps/
+datamap_DATA =     \
+  windows-lang.xml   \
+  $(NULL)
+
+EXTRA_DIST = $(datamap_DATA)
diff --git a/data/datamaps/windows-lang.xml b/data/datamaps/windows-lang.xml
new file mode 100644
index 0000000..04da1b5
--- /dev/null
+++ b/data/datamaps/windows-lang.xml
@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- The datamaps in this file will be used to map the language
+     tag that can be extracted from Windows ISO volume IDs to
+     a generic language ID in the format libosinfo expects
+-->
+
+<libosinfo version="0.0.1">
+  <!-- Volume ID strings up to Windows 7 -->
+  <datamap id="http://microsoft.com/win/7/l10n-language";>
+    <entry>
+      <inval>EN</inval>
+      <outval>en_US</outval>
+    </entry>
+    <entry>
+      <inval>AR</inval>
+      <outval>ar_SA</outval>
+    </entry>
+    <entry>
+      <inval>BG</inval>
+      <outval>bg_BG</outval>
+    </entry>
+    <entry>
+      <inval>HK</inval>
+      <outval>zh_HK</outval>
+    </entry>
+    <entry>
+      <inval>CN</inval>
+      <outval>zh_CN</outval>
+    </entry>
+    <entry>
+      <inval>TW</inval>
+      <outval>zh_TW</outval>
+    </entry>
+    <entry>
+      <inval>HR</inval>
+      <outval>hr_HR</outval>
+    </entry>
+    <entry>
+      <inval>CS</inval>
+      <outval>cs_CZ</outval>
+    </entry>
+    <entry>
+      <inval>DA</inval>
+      <outval>da_DK</outval>
+    </entry>
+    <entry>
+      <inval>NL</inval>
+      <outval>nl_NL</outval>
+    </entry>
+    <entry>
+      <inval>ET</inval>
+      <outval>et_EE</outval>
+    </entry>
+    <entry>
+      <inval>FI</inval>
+      <outval>fi_FI</outval>
+    </entry>
+    <entry>
+      <inval>FR</inval>
+      <outval>fr_FR</outval>
+    </entry>
+    <entry>
+      <inval>DE</inval>
+      <outval>de_DE</outval>
+    </entry>
+    <entry>
+      <inval>EL</inval>
+      <outval>el_GR</outval>
+    </entry>
+    <entry>
+      <inval>HE</inval>
+      <outval>he_IL</outval>
+    </entry>
+    <entry>
+      <inval>HU</inval>
+      <outval>hu_HU</outval>
+    </entry>
+    <entry>
+      <inval>IT</inval>
+      <outval>it_IT</outval>
+    </entry>
+    <entry>
+      <inval>JA</inval>
+      <outval>ja_JP</outval>
+    </entry>
+    <entry>
+      <inval>KO</inval>
+      <outval>ko_KR</outval>
+    </entry>
+    <entry>
+      <inval>LV</inval>
+      <outval>lv_LV</outval>
+    </entry>
+    <entry>
+      <inval>LT</inval>
+      <outval>lt_LT</outval>
+    </entry>
+    <entry>
+      <inval>NO</inval>
+      <outval>nb_NO</outval>
+    </entry>
+    <entry>
+      <inval>PL</inval>
+      <outval>pl_PL</outval>
+    </entry>
+    <entry>
+      <inval>BR</inval>
+      <outval>pt_BR</outval>
+    </entry>
+    <entry>
+      <inval>PT</inval>
+      <outval>pt_PT</outval>
+    </entry>
+    <entry>
+      <inval>RO</inval>
+      <outval>ro_RO</outval>
+    </entry>
+    <entry>
+      <inval>RU</inval>
+      <outval>ru_RU</outval>
+    </entry>
+    <entry>
+      <inval>SRL</inval>
+      <outval>sr_RS latin</outval>
+    </entry>
+    <entry>
+      <inval>SK</inval>
+      <outval>sk_SK</outval>
+    </entry>
+    <entry>
+      <inval>SL</inval>
+      <outval>sl_SI</outval>
+    </entry>
+    <entry>
+      <inval>ES</inval>
+      <outval>es_ES</outval>
+    </entry>
+    <entry>
+      <inval>SV</inval>
+      <outval>sv_SE</outval>
+    </entry>
+    <entry>
+      <inval>TH</inval>
+      <outval>th_TH</outval>
+    </entry>
+    <entry>
+      <inval>TR</inval>
+      <outval>tr_TR</outval>
+    </entry>
+    <entry>
+      <inval>UK</inval>
+      <outval>uk_UA</outval>
+    </entry>
+  </datamap>
+
+  <!-- Volume ID strings starting from Windows 8 -->
+  <datamap id="http://microsoft.com/win/8/l10n-language";>
+    <entry>
+      <inval>EN-US</inval>
+      <outval>en_US</outval>
+    </entry>
+    <entry>
+      <inval>EN-GB</inval>
+      <outval>en_GB</outval>
+    </entry>
+    <entry>
+      <inval>AR-SA</inval>
+      <outval>ar_SA</outval>
+    </entry>
+    <entry>
+      <inval>BG-BG</inval>
+      <outval>bg_BG</outval>
+    </entry>
+    <entry>
+      <inval>ZH-HK</inval>
+      <outval>zh_HK</outval>
+    </entry>
+    <entry>
+      <inval>ZH-CN</inval>
+      <outval>zh_CN</outval>
+    </entry>
+    <entry>
+      <inval>ZH-TW</inval>
+      <outval>zh_TW</outval>
+    </entry>
+    <entry>
+      <inval>HR-HR</inval>
+      <outval>hr_HR</outval>
+    </entry>
+    <entry>
+      <inval>CS-CZ</inval>
+      <outval>cs_CZ</outval>
+    </entry>
+    <entry>
+      <inval>DA-DK</inval>
+      <outval>da_DK</outval>
+    </entry>
+    <entry>
+      <inval>NL-NL</inval>
+      <outval>nl_NL</outval>
+    </entry>
+    <entry>
+      <inval>ET-EE</inval>
+      <outval>et_EE</outval>
+    </entry>
+    <entry>
+      <inval>FI-FI</inval>
+      <outval>fi_FI</outval>
+    </entry>
+    <entry>
+      <inval>FR-FR</inval>
+      <outval>fr_FR</outval>
+    </entry>
+    <entry>
+      <inval>DE-DE</inval>
+      <outval>de_DE</outval>
+    </entry>
+    <entry>
+      <inval>EL-GR</inval>
+      <outval>el_GR</outval>
+    </entry>
+    <entry>
+      <inval>HE-IL</inval>
+      <outval>he_IL</outval>
+    </entry>
+    <entry>
+      <inval>HU-HU</inval>
+      <outval>hu_HU</outval>
+    </entry>
+    <entry>
+      <inval>IT-IT</inval>
+      <outval>it_IT</outval>
+    </entry>
+    <entry>
+      <inval>JA-JP</inval>
+      <outval>ja_JP</outval>
+    </entry>
+    <entry>
+      <inval>KO-KR</inval>
+      <outval>ko_KR</outval>
+    </entry>
+    <entry>
+      <inval>LV-LV</inval>
+      <outval>lv_LV</outval>
+    </entry>
+    <entry>
+      <inval>LT-LT</inval>
+      <outval>lt_LT</outval>
+    </entry>
+    <entry>
+      <inval>NB-NO</inval>
+      <outval>nb_NO</outval>
+    </entry>
+    <entry>
+      <inval>PL-PL</inval>
+      <outval>pl_PL</outval>
+    </entry>
+    <entry>
+      <inval>PT-BR</inval>
+      <outval>pt_BR</outval>
+    </entry>
+    <entry>
+      <inval>PT-PT</inval>
+      <outval>pt_PT</outval>
+    </entry>
+    <entry>
+      <inval>RO-RO</inval>
+      <outval>ro_RO</outval>
+    </entry>
+    <entry>
+      <inval>RU-RU</inval>
+      <outval>ru_RU</outval>
+    </entry>
+    <entry>
+      <inval>SR-LATN-CS</inval>
+      <outval>sr_RS latin</outval>
+    </entry>
+    <entry>
+      <inval>SK-SK</inval>
+      <outval>sk_SK</outval>
+    </entry>
+    <entry>
+      <inval>SL-SI</inval>
+      <outval>sl_SI</outval>
+    </entry>
+    <entry>
+      <inval>ES-ES</inval>
+      <outval>es_ES</outval>
+    </entry>
+    <entry>
+      <inval>SV-SE</inval>
+      <outval>sv_SE</outval>
+    </entry>
+    <entry>
+      <inval>TH-TH</inval>
+      <outval>th_TH</outval>
+    </entry>
+    <entry>
+      <inval>TR-TR</inval>
+      <outval>tr_TR</outval>
+    </entry>
+    <entry>
+      <inval>UK-UA</inval>
+      <outval>uk_UA</outval>
+    </entry>
+  </datamap>
+</libosinfo>
+
diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in
index a3ff365..3a25af7 100644
--- a/data/oses/windows.xml.in
+++ b/data/oses/windows.xml.in
@@ -288,6 +288,7 @@
     <media arch="i386">
       <iso>
           <volume-id>(W2AFPP|SP1AFPP|SP2AFPP|YRMAFPP|ZRMAFPP|W2AOEM|SP1AOEM|SP2AOEM|YRMAOEM|ZRMAOEM|W2ASEL|SP2ASEL|W2SFPP|SP1SFPP|SP2SFPP|YRMSFPP|ZRMSFPP|W2SOEM|W2SOEM|SP1SOEM|SP2SOEM|YRMSOEM|ZRMSOEM|W2SSEL|SP2SSEL|W2PFPP|SP1PFPP|SP2PFPP|YRMPFPP|ZRMPFPP|W2POEM|SP1POEM|SP2POEM|YRMPOEM|ZRMPOEM|W2PSEL|SP2PSEL|W2PCCP|WIN2000|W2K_SP4)</volume-id>
+          <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
 
@@ -332,6 +333,7 @@
       <iso>
         <volume-id>(WXPFPP|WXHFPP|WXPCCP|WXHCCP|WXPOEM|WXHOEM|WXPVOL|WXPEVL|XRMPFPP|XRMHFPP|XRMPCCP|XRMHCCP|XRMPOEM|XRMHOEM|XRMPVOL|XRMSD2|X1APFPP|X1AHFPP|X1APCCP|X1APCCP|X1AHCCP|X1APOEM|X1AHOEM|X1APVOL|VRMPFPP|VRMHFPP|VRMPCCP|VRMHCCP|VRMPOEM|VRMHOEM|VRMPVOL|VRMSD2|VX2PFPP|VX2HFPP|VX2PCCP|VX2HCCP|VX2POEM|VX2HOEM|VX2PRMFPP|VX2PVOL|GRTMUPD|GRTMPFPP|GRTMPRMFPP|GRTMHFPP|GRTMHKFPP|GRTMHKNFPP|GRTMHRMFPP|GRTMPOEM|GRTMHOEM|GRTMPVOL|GRTMPKNVOL|GRTMPKVOL|GRTMPRMVOL|MX2PFPP|MRMSD2)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
 
@@ -339,6 +341,7 @@
       <iso>
         <volume-id>(ARMPXFPP|ARMPXCCP|ARMPXOEM|ARMPXVOL|AX2PXCFPP|AX2PXFPP)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
 
@@ -416,18 +419,21 @@
       <iso>
         <volume-id>(ARMECHK|ARMEVOL|ARMSVOL|ARMWVOL|ARMEEVL|ARMSEVL|ARMWEVL|ARMEOEM|ARMDOEM|ARMSOEM|ARMWOEM|ARMEFPP|ARMDFPP|ARMSFPP|ARMWFPP|NRMECHK|NRMEVOL|NRMSVOL|NRMWVOL|NRMEEVL|NRMSEVL|NRMWEVL|NRMEOEM|NRMDOEM|NRMSOEM|NRMWOEM|NRMEFPP|NRMDFPP|NRMSFPP|NRMSFPP|CRMSVOL|CRMSXVOL|BRMEVOL|BX2DVOL|ARMEEVL|BRMEEVL|CR0SP2)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
     <media arch="x86_64">
       <iso>
         <volume-id>(ARMEICHK|ARMEIFPP|ARMEIEVL|ARMEIOEM|ARMDIOEM|ARMEXFPP|ARMDFPP|ARMSXFPP|CR0SPX2|NRMEICHK|NRMEIFPP|NRMDIFPP|NRMEIOEM|NRMDIOEM|NRMEIVOL|NRMEIEVL|BRMEXVOL|BX2DXVOL)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
     <media arch="ia64">
       <iso>
         <volume-id>(ARMEIFPP|CR0SPI2)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
 
@@ -484,12 +490,14 @@
       <iso>
         <volume-id>(CRMEFPP|CRMSFPP|CR0SCD2|CR0ECD2|BX2SFPP|BX2EFPP|BRMECD2FRE|BRMSCD2FRE)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
     <media arch="x86_64">
       <iso>
         <volume-id>(CRMEXFPP|CRMSXFPP|CR0SCD2X|CR0ECD2X|BX2SXFPP|BX2EXFPP|BRMECD2XFRE|BRMSCD2XFRE)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
 
@@ -546,12 +554,14 @@
       <iso>
         <volume-id>(KRTMSVOL|KRTMSCHK|KRMWVOL|KRMSVOL)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
     <media arch="x86_64">
       <iso>
         <volume-id>(KRTMSXVOL|KRTMSXCHK|KRMWXVOL|KRMSXVOL)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
 
@@ -608,12 +618,14 @@
       <iso>
         <volume-id>(GRMSXVOL|GRMSXFRER|GRMSHXVOL)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
     <media arch="ia64">
       <iso>
         <volume-id>(GRMSIAIVOL|SRVHPCR2)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
 
@@ -655,12 +667,14 @@
       <iso>
         <volume-id>(FB1EVOL|LRMCFRE|FRTMBVOL|FRMBVOL|FRMEVOL)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
     <media arch="x86_64">
       <iso>
         <volume-id>(FB1EXVOL|LRMCXFRE|FRTMBXVOL|FRMBXVOL|FRMEXVOL)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
 
@@ -701,13 +715,14 @@
       <iso>
         <volume-id>(GRMCULFRER|GSP1RMCNPRFRER|GSP1RMCNULFRER|GSP1RMCULFRER|GSP1RMCPRFRER|GRMCENVOL|GRMCNENVOL|GRMCPRFRER|GSP1RMCPRVOL)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
-
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
     <media arch="x86_64" installer-reboots="2">
       <iso>
         <volume-id>(GRMCULXFRER|GSP1RMCPRXFRER|GSP1RMCNHPXFRER|GRMCHPXFRER|GSP1RMCENXVOL|GRMCENXVOL|GRMCNENXVOL|GRMCPRXFRER|GSP1RMCPRXVOL)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/7/l10n-language";>[[:upper:][:digit:]]*_([[:upper:]]*)</l10n-language>
       </iso>
     </media>
 
@@ -773,12 +788,14 @@
       <iso>
         <volume-id>(HB1_CCPA_X86FRE|HRM_CCSA_X86FRE|HRM_CCSA_X86CHK|HRM_CCSNA_X86CHK|HRM_CCSNA_X86FRE|HRM_CENA_X86FREV|HRM_CENA_X86CHKV|HRM_CENNA_X86FREV|HRM_CENNA_X86CHKV|HRM_CPRA_X86FREV|HRM_CPRNA_X86FREV)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/8/l10n-language";>[[:upper:][:digit:]_]*_([[:upper:]]*-[[:upper:]]*)</l10n-language>
       </iso>
     </media>
     <media arch="x86_64">
       <iso>
         <volume-id>(HB1_CCPA_X64FRE|HRM_CCSA_X64FRE|HRM_CCSA_X64CHK|HRM_CCSNA_X64FRE|HRM_CCSNA_X64CHK|HRM_CENNA_X64FREV|HRM_CENNA_X64CHKV|HRM_CENA_X64FREV|HRM_CENA_X64CHKV|HRM_CPRA_X64FREV|HRM_CPRNA_X64FREV)_</volume-id>
         <publisher-id>MICROSOFT CORPORATION</publisher-id>
+        <l10n-language type="regex" l10n-language-map="http://microsoft.com/win/8/l10n-language";>[[:upper:][:digit:]_]*_([[:upper:]]*-[[:upper:]]*)</l10n-language>
       </iso>
     </media>
 
-- 
1.8.0.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]