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

[virt-tools-list] [libosinfo] 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.
---

This is what this patch becomes with the datamap format changes in v3 of
the datamap series.

 configure.ac                   |  3 +-
 data/Makefile.am               |  2 +-
 data/datamaps/Makefile.am      |  7 ++++
 data/datamaps/windows-lang.xml | 89 ++++++++++++++++++++++++++++++++++++++++++
 data/oses/windows.xml.in       | 19 ++++++++-
 5 files changed, 117 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 95aa34c..ade0ee7 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..7588e80
--- /dev/null
+++ b/data/datamaps/windows-lang.xml
@@ -0,0 +1,89 @@
+<?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" outval="en_US"/>
+    <entry inval="AR" outval="ar_SA"/>
+    <entry inval="BG" outval="bg_BG"/>
+    <entry inval="HK" outval="zh_HK"/>
+    <entry inval="CN" outval="zh_CN"/>
+    <entry inval="TW" outval="zh_TW"/>
+    <entry inval="HR" outval="hr_HR"/>
+    <entry inval="CS" outval="cs_CZ"/>
+    <entry inval="DA" outval="da_DK"/>
+    <entry inval="NL" outval="nl_NL"/>
+    <entry inval="ET" outval="et_EE"/>
+    <entry inval="FI" outval="fi_FI"/>
+    <entry inval="FR" outval="fr_FR"/>
+    <entry inval="DE" outval="de_DE"/>
+    <entry inval="EL" outval="el_GR"/>
+    <entry inval="HE" outval="he_IL"/>
+    <entry inval="HU" outval="hu_HU"/>
+    <entry inval="IT" outval="it_IT"/>
+    <entry inval="JA" outval="ja_JP"/>
+    <entry inval="KO" outval="ko_KR"/>
+    <entry inval="LV" outval="lv_LV"/>
+    <entry inval="LT" outval="lt_LT"/>
+    <entry inval="NO" outval="nb_NO"/>
+    <entry inval="PL" outval="pl_PL"/>
+    <entry inval="BR" outval="pt_BR"/>
+    <entry inval="PT" outval="pt_PT"/>
+    <entry inval="RO" outval="ro_RO"/>
+    <entry inval="RU" outval="ru_RU"/>
+    <entry inval="SRL" outval="sr_RS latin"/>
+    <entry inval="SK" outval="sk_SK"/>
+    <entry inval="SL" outval="sl_SI"/>
+    <entry inval="ES" outval="es_ES"/>
+    <entry inval="SV" outval="sv_SE"/>
+    <entry inval="TH" outval="th_TH"/>
+    <entry inval="TR" outval="tr_TR"/>
+    <entry inval="UK" outval="uk_UA"/>
+  </datamap>
+
+  <!-- Volume ID strings starting from Windows 8 -->
+  <datamap id="http://microsoft.com/win/8/l10n-language";>
+    <entry inval="EN-US" outval="en_US"/>
+    <entry inval="EN-GB" outval="en_GB"/>
+    <entry inval="AR-SA" outval="ar_SA"/>
+    <entry inval="BG-BG" outval="bg_BG"/>
+    <entry inval="ZH-HK" outval="zh_HK"/>
+    <entry inval="ZH-CN" outval="zh_CN"/>
+    <entry inval="ZH-TW" outval="zh_TW"/>
+    <entry inval="HR-HR" outval="hr_HR"/>
+    <entry inval="CS-CZ" outval="cs_CZ"/>
+    <entry inval="DA-DK" outval="da_DK"/>
+    <entry inval="NL-NL" outval="nl_NL"/>
+    <entry inval="ET-EE" outval="et_EE"/>
+    <entry inval="FI-FI" outval="fi_FI"/>
+    <entry inval="FR-FR" outval="fr_FR"/>
+    <entry inval="DE-DE" outval="de_DE"/>
+    <entry inval="EL-GR" outval="el_GR"/>
+    <entry inval="HE-IL" outval="he_IL"/>
+    <entry inval="HU-HU" outval="hu_HU"/>
+    <entry inval="IT-IT" outval="it_IT"/>
+    <entry inval="JA-JP" outval="ja_JP"/>
+    <entry inval="KO-KR" outval="ko_KR"/>
+    <entry inval="LV-LV" outval="lv_LV"/>
+    <entry inval="LT-LT" outval="lt_LT"/>
+    <entry inval="NB-NO" outval="nb_NO"/>
+    <entry inval="PL-PL" outval="pl_PL"/>
+    <entry inval="PT-BR" outval="pt_BR"/>
+    <entry inval="PT-PT" outval="pt_PT"/>
+    <entry inval="RO-RO" outval="ro_RO"/>
+    <entry inval="RU-RU" outval="ru_RU"/>
+    <entry inval="SR-LATN-CS" outval="sr_RS latin"/>
+    <entry inval="SK-SK" outval="sk_SK"/>
+    <entry inval="SL-SI" outval="sl_SI"/>
+    <entry inval="ES-ES" outval="es_ES"/>
+    <entry inval="SV-SE" outval="sv_SE"/>
+    <entry inval="TH-TH" outval="th_TH"/>
+    <entry inval="TR-TR" outval="tr_TR"/>
+    <entry inval="UK-UA" outval="uk_UA"/>
+  </datamap>
+</libosinfo>
diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in
index a3ff365..310de62 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 regex="true" 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 regex="true" 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 regex="true" 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 regex="true" 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 regex="true" 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 regex="true" 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 regex="true" 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 regex="true" 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 regex="true" 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 regex="true" 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 regex="true" 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 regex="true" 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 regex="true" 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 regex="true" 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 regex="true" 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 regex="true" 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 regex="true" 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 regex="true" 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]