https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8f907ea83a83dccc104c5…
commit 8f907ea83a83dccc104c542078905250e27928c8
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Aug 17 06:40:39 2020 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Aug 17 06:40:39 2020 +0900
[SHLWAPI] Localize StrFormatByteSizeA/W (#3051)
CORE-14011
---
dll/win32/shlwapi/lang/da-DK.rc | 8 ++++++++
dll/win32/shlwapi/lang/de-DE.rc | 8 ++++++++
dll/win32/shlwapi/lang/en-US.rc | 8 ++++++++
dll/win32/shlwapi/lang/es-ES.rc | 8 ++++++++
dll/win32/shlwapi/lang/fi-FI.rc | 8 ++++++++
dll/win32/shlwapi/lang/fr-FR.rc | 8 ++++++++
dll/win32/shlwapi/lang/he-IL.rc | 8 ++++++++
dll/win32/shlwapi/lang/hu-HU.rc | 8 ++++++++
dll/win32/shlwapi/lang/it-IT.rc | 8 ++++++++
dll/win32/shlwapi/lang/ja-JP.rc | 8 ++++++++
dll/win32/shlwapi/lang/ko-KR.rc | 8 ++++++++
dll/win32/shlwapi/lang/lt-LT.rc | 8 ++++++++
dll/win32/shlwapi/lang/nl-NL.rc | 8 ++++++++
dll/win32/shlwapi/lang/no-NO.rc | 8 ++++++++
dll/win32/shlwapi/lang/pl-PL.rc | 8 ++++++++
dll/win32/shlwapi/lang/pt-PT.rc | 8 ++++++++
dll/win32/shlwapi/lang/ro-RO.rc | 8 ++++++++
dll/win32/shlwapi/lang/ru-RU.rc | 8 ++++++++
dll/win32/shlwapi/lang/sk-SK.rc | 8 ++++++++
dll/win32/shlwapi/lang/sl-SI.rc | 8 ++++++++
dll/win32/shlwapi/lang/sq-AL.rc | 8 ++++++++
dll/win32/shlwapi/lang/sv-SE.rc | 8 ++++++++
dll/win32/shlwapi/lang/tr-TR.rc | 8 ++++++++
dll/win32/shlwapi/lang/uk-UA.rc | 8 ++++++++
dll/win32/shlwapi/lang/zh-CN.rc | 8 ++++++++
dll/win32/shlwapi/resource.h | 8 ++++++++
dll/win32/shlwapi/string.c | 34 ++++++++++++++++++++++++++++++++++
27 files changed, 242 insertions(+)
diff --git a/dll/win32/shlwapi/lang/da-DK.rc b/dll/win32/shlwapi/lang/da-DK.rc
index 55888c926ee..68019343bda 100644
--- a/dll/win32/shlwapi/lang/da-DK.rc
+++ b/dll/win32/shlwapi/lang/da-DK.rc
@@ -26,6 +26,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/de-DE.rc b/dll/win32/shlwapi/lang/de-DE.rc
index bf1ddb92d3e..4dc8a1513dd 100644
--- a/dll/win32/shlwapi/lang/de-DE.rc
+++ b/dll/win32/shlwapi/lang/de-DE.rc
@@ -28,6 +28,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " Std"
IDS_TIME_INTERVAL_MINUTES " Min"
IDS_TIME_INTERVAL_SECONDS " Sek"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/en-US.rc b/dll/win32/shlwapi/lang/en-US.rc
index 1b7a14ec1d6..3feb41b0bb3 100644
--- a/dll/win32/shlwapi/lang/en-US.rc
+++ b/dll/win32/shlwapi/lang/en-US.rc
@@ -26,6 +26,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/es-ES.rc b/dll/win32/shlwapi/lang/es-ES.rc
index c7544abc577..68d9e93abb0 100644
--- a/dll/win32/shlwapi/lang/es-ES.rc
+++ b/dll/win32/shlwapi/lang/es-ES.rc
@@ -26,6 +26,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/fi-FI.rc b/dll/win32/shlwapi/lang/fi-FI.rc
index 5c3708d9bd0..224a6d141c8 100644
--- a/dll/win32/shlwapi/lang/fi-FI.rc
+++ b/dll/win32/shlwapi/lang/fi-FI.rc
@@ -26,6 +26,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/fr-FR.rc b/dll/win32/shlwapi/lang/fr-FR.rc
index d0b35fbb0e9..b97fdeac94a 100644
--- a/dll/win32/shlwapi/lang/fr-FR.rc
+++ b/dll/win32/shlwapi/lang/fr-FR.rc
@@ -29,6 +29,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " h"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " s"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/he-IL.rc b/dll/win32/shlwapi/lang/he-IL.rc
index 1bccfdc92e3..256192b2e26 100644
--- a/dll/win32/shlwapi/lang/he-IL.rc
+++ b/dll/win32/shlwapi/lang/he-IL.rc
@@ -28,6 +28,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " שעות"
IDS_TIME_INTERVAL_MINUTES " דקות"
IDS_TIME_INTERVAL_SECONDS " שניות"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/hu-HU.rc b/dll/win32/shlwapi/lang/hu-HU.rc
index 61c0821f405..8fa7afa1db3 100644
--- a/dll/win32/shlwapi/lang/hu-HU.rc
+++ b/dll/win32/shlwapi/lang/hu-HU.rc
@@ -29,6 +29,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " óra"
IDS_TIME_INTERVAL_MINUTES " perc"
IDS_TIME_INTERVAL_SECONDS " mp"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/it-IT.rc b/dll/win32/shlwapi/lang/it-IT.rc
index 379b3309fd3..29c45dd3bba 100644
--- a/dll/win32/shlwapi/lang/it-IT.rc
+++ b/dll/win32/shlwapi/lang/it-IT.rc
@@ -26,6 +26,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/ja-JP.rc b/dll/win32/shlwapi/lang/ja-JP.rc
index eacf29b09df..50388113a38 100644
--- a/dll/win32/shlwapi/lang/ja-JP.rc
+++ b/dll/win32/shlwapi/lang/ja-JP.rc
@@ -29,6 +29,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " 時間"
IDS_TIME_INTERVAL_MINUTES " 分"
IDS_TIME_INTERVAL_SECONDS " 秒"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/ko-KR.rc b/dll/win32/shlwapi/lang/ko-KR.rc
index fbaa26b9cef..0005cf4e7da 100644
--- a/dll/win32/shlwapi/lang/ko-KR.rc
+++ b/dll/win32/shlwapi/lang/ko-KR.rc
@@ -26,6 +26,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS "시"
IDS_TIME_INTERVAL_MINUTES " 분"
IDS_TIME_INTERVAL_SECONDS " 초"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/lt-LT.rc b/dll/win32/shlwapi/lang/lt-LT.rc
index 841fd4f47b1..717c17e9434 100644
--- a/dll/win32/shlwapi/lang/lt-LT.rc
+++ b/dll/win32/shlwapi/lang/lt-LT.rc
@@ -29,6 +29,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " val"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sek"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/nl-NL.rc b/dll/win32/shlwapi/lang/nl-NL.rc
index a492d8ed4fb..0862f166fc0 100644
--- a/dll/win32/shlwapi/lang/nl-NL.rc
+++ b/dll/win32/shlwapi/lang/nl-NL.rc
@@ -26,6 +26,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/no-NO.rc b/dll/win32/shlwapi/lang/no-NO.rc
index 90954c384e2..ba77b987e06 100644
--- a/dll/win32/shlwapi/lang/no-NO.rc
+++ b/dll/win32/shlwapi/lang/no-NO.rc
@@ -26,6 +26,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/pl-PL.rc b/dll/win32/shlwapi/lang/pl-PL.rc
index 42548c602c9..fd55f1fb785 100644
--- a/dll/win32/shlwapi/lang/pl-PL.rc
+++ b/dll/win32/shlwapi/lang/pl-PL.rc
@@ -27,6 +27,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " godz."
IDS_TIME_INTERVAL_MINUTES " min."
IDS_TIME_INTERVAL_SECONDS " s"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/pt-PT.rc b/dll/win32/shlwapi/lang/pt-PT.rc
index 1ce63e35dec..242b0994dab 100644
--- a/dll/win32/shlwapi/lang/pt-PT.rc
+++ b/dll/win32/shlwapi/lang/pt-PT.rc
@@ -30,6 +30,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " hr"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " seg"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/ro-RO.rc b/dll/win32/shlwapi/lang/ro-RO.rc
index 1c1ee5bd99d..86a2684a913 100644
--- a/dll/win32/shlwapi/lang/ro-RO.rc
+++ b/dll/win32/shlwapi/lang/ro-RO.rc
@@ -30,6 +30,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " ore"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sec"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/ru-RU.rc b/dll/win32/shlwapi/lang/ru-RU.rc
index a39c6e8745b..8e963a01672 100644
--- a/dll/win32/shlwapi/lang/ru-RU.rc
+++ b/dll/win32/shlwapi/lang/ru-RU.rc
@@ -29,6 +29,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " час"
IDS_TIME_INTERVAL_MINUTES " мин"
IDS_TIME_INTERVAL_SECONDS " сек"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s КБ"
+ IDS_MB_FORMAT "%s МБ"
+ IDS_GB_FORMAT "%s ГБ"
+ IDS_TB_FORMAT "%s ТБ"
+ IDS_PB_FORMAT "%s ПБ"
+ IDS_EB_FORMAT "%s ЭБ"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/sk-SK.rc b/dll/win32/shlwapi/lang/sk-SK.rc
index 98c3162d4d7..79769302560 100644
--- a/dll/win32/shlwapi/lang/sk-SK.rc
+++ b/dll/win32/shlwapi/lang/sk-SK.rc
@@ -27,6 +27,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " hod."
IDS_TIME_INTERVAL_MINUTES " min."
IDS_TIME_INTERVAL_SECONDS " s"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/sl-SI.rc b/dll/win32/shlwapi/lang/sl-SI.rc
index 7ebbe0b66c2..abcf7e6efc5 100644
--- a/dll/win32/shlwapi/lang/sl-SI.rc
+++ b/dll/win32/shlwapi/lang/sl-SI.rc
@@ -28,6 +28,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " ur"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sek"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/sq-AL.rc b/dll/win32/shlwapi/lang/sq-AL.rc
index 17769093457..ec7f10e706a 100644
--- a/dll/win32/shlwapi/lang/sq-AL.rc
+++ b/dll/win32/shlwapi/lang/sq-AL.rc
@@ -26,6 +26,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " rë"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " sek"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/sv-SE.rc b/dll/win32/shlwapi/lang/sv-SE.rc
index 1afbdd9e5c1..82e5eee9fcb 100644
--- a/dll/win32/shlwapi/lang/sv-SE.rc
+++ b/dll/win32/shlwapi/lang/sv-SE.rc
@@ -26,6 +26,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " h"
IDS_TIME_INTERVAL_MINUTES " min"
IDS_TIME_INTERVAL_SECONDS " s"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/tr-TR.rc b/dll/win32/shlwapi/lang/tr-TR.rc
index d82ae8ae85f..25b3e15cbc8 100644
--- a/dll/win32/shlwapi/lang/tr-TR.rc
+++ b/dll/win32/shlwapi/lang/tr-TR.rc
@@ -26,6 +26,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " saat"
IDS_TIME_INTERVAL_MINUTES " dakîka"
IDS_TIME_INTERVAL_SECONDS " sâniye"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/uk-UA.rc b/dll/win32/shlwapi/lang/uk-UA.rc
index 434e8e16bee..f4e190975bd 100644
--- a/dll/win32/shlwapi/lang/uk-UA.rc
+++ b/dll/win32/shlwapi/lang/uk-UA.rc
@@ -29,6 +29,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " год"
IDS_TIME_INTERVAL_MINUTES " хв"
IDS_TIME_INTERVAL_SECONDS " сек."
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/lang/zh-CN.rc b/dll/win32/shlwapi/lang/zh-CN.rc
index 34891f30162..8679090f951 100644
--- a/dll/win32/shlwapi/lang/zh-CN.rc
+++ b/dll/win32/shlwapi/lang/zh-CN.rc
@@ -29,6 +29,14 @@ STRINGTABLE
IDS_TIME_INTERVAL_HOURS " 小时"
IDS_TIME_INTERVAL_MINUTES " 分"
IDS_TIME_INTERVAL_SECONDS " 秒"
+#ifdef __REACTOS__
+ IDS_KB_FORMAT "%s KB"
+ IDS_MB_FORMAT "%s MB"
+ IDS_GB_FORMAT "%s GB"
+ IDS_TB_FORMAT "%s TB"
+ IDS_PB_FORMAT "%s PB"
+ IDS_EB_FORMAT "%s EB"
+#endif
}
IDD_ERR_DIALOG DIALOGEX 0, 0, 220, 60
diff --git a/dll/win32/shlwapi/resource.h b/dll/win32/shlwapi/resource.h
index a9af2bad621..ac10c5a5c9f 100644
--- a/dll/win32/shlwapi/resource.h
+++ b/dll/win32/shlwapi/resource.h
@@ -27,6 +27,14 @@
#define IDS_TIME_INTERVAL_HOURS 65
#define IDS_TIME_INTERVAL_MINUTES 66
#define IDS_TIME_INTERVAL_SECONDS 67
+#ifdef __REACTOS__
+#define IDS_KB_FORMAT 68
+#define IDS_MB_FORMAT 69
+#define IDS_GB_FORMAT 70
+#define IDS_TB_FORMAT 71
+#define IDS_PB_FORMAT 72
+#define IDS_EB_FORMAT 73
+#endif
/* These numbers match native IDs and shouldn't be arbitrarily changed */
#define IDD_ERR_DIALOG 0x1200
diff --git a/dll/win32/shlwapi/string.c b/dll/win32/shlwapi/string.c
index 0b34d43624c..18a1be3ddcd 100644
--- a/dll/win32/shlwapi/string.c
+++ b/dll/win32/shlwapi/string.c
@@ -2354,7 +2354,11 @@ typedef struct tagSHLWAPI_BYTEFORMATS
double dDivisor;
double dNormaliser;
int nDecimals;
+#ifdef __REACTOS__
+ UINT nFormatID;
+#else
WCHAR wPrefix;
+#endif
} SHLWAPI_BYTEFORMATS;
/*************************************************************************
@@ -2383,6 +2387,24 @@ LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest,
UINT cchMax)
static const SHLWAPI_BYTEFORMATS bfFormats[] =
{
+#ifdef __REACTOS__
+ { 10*KB, 10.24, 100.0, 2, IDS_KB_FORMAT }, /* 10 KB */
+ { 100*KB, 102.4, 10.0, 1, IDS_KB_FORMAT }, /* 100 KB */
+ { 1000*KB, 1024.0, 1.0, 0, IDS_KB_FORMAT }, /* 1000 KB */
+ { 10*MB, 10485.76, 100.0, 2, IDS_MB_FORMAT }, /* 10 MB */
+ { 100*MB, 104857.6, 10.0, 1, IDS_MB_FORMAT }, /* 100 MB */
+ { 1000*MB, 1048576.0, 1.0, 0, IDS_MB_FORMAT }, /* 1000 MB */
+ { 10*GB, 10737418.24, 100.0, 2, IDS_GB_FORMAT }, /* 10 GB */
+ { 100*GB, 107374182.4, 10.0, 1, IDS_GB_FORMAT }, /* 100 GB */
+ { 1000*GB, 1073741824.0, 1.0, 0, IDS_GB_FORMAT }, /* 1000 GB */
+ { 10*TB, 10485.76, 100.0, 2, IDS_TB_FORMAT }, /* 10 TB */
+ { 100*TB, 104857.6, 10.0, 1, IDS_TB_FORMAT }, /* 100 TB */
+ { 1000*TB, 1048576.0, 1.0, 0, IDS_TB_FORMAT }, /* 1000 TB */
+ { 10*PB, 10737418.24, 100.00, 2, IDS_PB_FORMAT }, /* 10 PB */
+ { 100*PB, 107374182.4, 10.00, 1, IDS_PB_FORMAT }, /* 100 PB */
+ { 1000*PB, 1073741824.0, 1.00, 0, IDS_PB_FORMAT }, /* 1000 PB */
+ { 0, 10995116277.76, 100.00, 2, IDS_EB_FORMAT } /* EB's, catch all */
+#else
{ 10*KB, 10.24, 100.0, 2, 'K' }, /* 10 KB */
{ 100*KB, 102.4, 10.0, 1, 'K' }, /* 100 KB */
{ 1000*KB, 1024.0, 1.0, 0, 'K' }, /* 1000 KB */
@@ -2399,8 +2421,13 @@ LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest,
UINT cchMax)
{ 100*PB, 107374182.4, 10.00, 1, 'P' }, /* 100 PB */
{ 1000*PB, 1073741824.0, 1.00, 0, 'P' }, /* 1000 PB */
{ 0, 10995116277.76, 100.00, 2, 'E' } /* EB's, catch all */
+#endif
};
+#ifdef __REACTOS__
+ WCHAR szBuff[40], wszFormat[40];
+#else
WCHAR wszAdd[] = {' ','?','B',0};
+#endif
double dBytes;
UINT i = 0;
@@ -2439,10 +2466,17 @@ LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR
lpszDest, UINT cchMax)
dBytes = floor(dBytes / bfFormats[i].dDivisor) / bfFormats[i].dNormaliser;
+#ifdef __REACTOS__
+ if (!FormatDouble(dBytes, bfFormats[i].nDecimals, szBuff, ARRAYSIZE(szBuff)))
+ return NULL;
+ LoadStringW(shlwapi_hInstance, bfFormats[i].nFormatID, wszFormat,
ARRAYSIZE(wszFormat));
+ snprintfW(lpszDest, cchMax, wszFormat, szBuff);
+#else
if (!FormatDouble(dBytes, bfFormats[i].nDecimals, lpszDest, cchMax))
return NULL;
wszAdd[1] = bfFormats[i].wPrefix;
StrCatBuffW(lpszDest, wszAdd, cchMax);
+#endif
return lpszDest;
}