diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-09-02 12:11:30 -0400 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-09-05 14:37:16 -0400 |
commit | 43a3471298c429530aaf8c8cf2e2c3563079a9e4 (patch) | |
tree | 72a8c7adde28e2aa529e4810919f4421122ddb5b | |
parent | ff48220dcae7109de994a727bea24a25a6649412 (diff) | |
download | serenity-43a3471298c429530aaf8c8cf2e2c3563079a9e4.zip |
LibLocale: Move locale source files to the LibLocale folder
These are still included in LibUnicode, but this updates their location
and the include paths of other files which include them.
48 files changed, 145 insertions, 135 deletions
diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt index 472ebbf7d8..d330d55ac5 100644 --- a/Meta/Lagom/CMakeLists.txt +++ b/Meta/Lagom/CMakeLists.txt @@ -504,8 +504,9 @@ if (BUILD_LAGOM) include(unicode_data) include(locale_data) file(GLOB LIBUNICODE_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibUnicode/*.cpp") + file(GLOB LIBLOCALE_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibLocale/*.cpp") lagom_lib(Unicode unicode - SOURCES ${LIBUNICODE_SOURCES} ${UNICODE_DATA_SOURCES} ${LOCALE_DATA_SOURCES} + SOURCES ${LIBUNICODE_SOURCES} ${UNICODE_DATA_SOURCES} ${LIBLOCALE_SOURCES} ${LOCALE_DATA_SOURCES} ) target_compile_definitions(LibUnicode PRIVATE ENABLE_UNICODE_DATA=$<BOOL:${ENABLE_UNICODE_DATABASE_DOWNLOAD}>) target_compile_options(LibUnicode PRIVATE -Wno-parentheses-equality) diff --git a/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateDateTimeFormatData.cpp b/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateDateTimeFormatData.cpp index 860eef598e..644bbd0818 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateDateTimeFormatData.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateDateTimeFormatData.cpp @@ -24,8 +24,8 @@ #include <LibCore/ArgsParser.h> #include <LibCore/DirIterator.h> #include <LibCore/Stream.h> +#include <LibLocale/DateTimeFormat.h> #include <LibTimeZone/TimeZone.h> -#include <LibUnicode/DateTimeFormat.h> using StringIndexType = u16; constexpr auto s_string_index_type = "u16"sv; @@ -1768,11 +1768,11 @@ static ErrorOr<void> generate_unicode_locale_implementation(Core::Stream::Buffer #include <AK/BinarySearch.h> #include <AK/Optional.h> #include <AK/StringView.h> -#include <LibLocale/LocaleData.h> +#include <LibLocale/DateTimeFormat.h> #include <LibLocale/DateTimeFormatData.h> +#include <LibLocale/Locale.h> +#include <LibLocale/LocaleData.h> #include <LibTimeZone/TimeZone.h> -#include <LibUnicode/DateTimeFormat.h> -#include <LibUnicode/Locale.h> namespace Locale { )~~~"); diff --git a/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateLocaleData.cpp b/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateLocaleData.cpp index 933ff85893..32f34ac24b 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateLocaleData.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateLocaleData.cpp @@ -1102,10 +1102,10 @@ static ErrorOr<void> generate_unicode_locale_implementation(Core::Stream::Buffer #include <AK/Span.h> #include <AK/StringView.h> #include <AK/Vector.h> +#include <LibLocale/DateTimeFormat.h> +#include <LibLocale/Locale.h> #include <LibLocale/LocaleData.h> #include <LibUnicode/CurrencyCode.h> -#include <LibUnicode/DateTimeFormat.h> -#include <LibUnicode/Locale.h> namespace Locale { )~~~"); diff --git a/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateNumberFormatData.cpp b/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateNumberFormatData.cpp index dc935b6342..0451b5c989 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateNumberFormatData.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateNumberFormatData.cpp @@ -27,9 +27,9 @@ #include <LibCore/File.h> #include <LibCore/Stream.h> #include <LibJS/Runtime/Intl/SingleUnitIdentifiers.h> -#include <LibUnicode/Locale.h> -#include <LibUnicode/NumberFormat.h> -#include <LibUnicode/PluralRules.h> +#include <LibLocale/Locale.h> +#include <LibLocale/NumberFormat.h> +#include <LibLocale/PluralRules.h> #include <math.h> using StringIndexType = u16; @@ -806,11 +806,11 @@ static ErrorOr<void> generate_unicode_locale_implementation(Core::Stream::Buffer #include <AK/Span.h> #include <AK/StringView.h> #include <AK/Vector.h> +#include <LibLocale/Locale.h> #include <LibLocale/LocaleData.h> +#include <LibLocale/NumberFormat.h> #include <LibLocale/NumberFormatData.h> -#include <LibUnicode/Locale.h> -#include <LibUnicode/NumberFormat.h> -#include <LibUnicode/PluralRules.h> +#include <LibLocale/PluralRules.h> namespace Locale { )~~~"); diff --git a/Meta/Lagom/Tools/CodeGenerators/LibLocale/GeneratePluralRulesData.cpp b/Meta/Lagom/Tools/CodeGenerators/LibLocale/GeneratePluralRulesData.cpp index 5521398123..46af3a493d 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibLocale/GeneratePluralRulesData.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibLocale/GeneratePluralRulesData.cpp @@ -17,7 +17,7 @@ #include <LibCore/ArgsParser.h> #include <LibCore/File.h> #include <LibCore/Stream.h> -#include <LibUnicode/PluralRules.h> +#include <LibLocale/PluralRules.h> using StringIndexType = u16; @@ -460,10 +460,10 @@ static ErrorOr<void> generate_unicode_locale_implementation(Core::Stream::Buffer generator.append(R"~~~( #include <AK/Array.h> +#include <LibLocale/Locale.h> #include <LibLocale/LocaleData.h> +#include <LibLocale/PluralRules.h> #include <LibLocale/PluralRulesData.h> -#include <LibUnicode/Locale.h> -#include <LibUnicode/PluralRules.h> #include <math.h> namespace Locale { diff --git a/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateRelativeTimeFormatData.cpp b/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateRelativeTimeFormatData.cpp index 736c3952f4..dc2db86d33 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateRelativeTimeFormatData.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibLocale/GenerateRelativeTimeFormatData.cpp @@ -17,8 +17,8 @@ #include <LibCore/ArgsParser.h> #include <LibCore/DirIterator.h> #include <LibCore/Stream.h> -#include <LibUnicode/Locale.h> -#include <LibUnicode/RelativeTimeFormat.h> +#include <LibLocale/Locale.h> +#include <LibLocale/RelativeTimeFormat.h> using StringIndexType = u16; constexpr auto s_string_index_type = "u16"sv; @@ -178,7 +178,7 @@ static ErrorOr<void> generate_unicode_locale_header(Core::Stream::BufferedFile& generator.append(R"~~~( #pragma once -#include <LibUnicode/Forward.h> +#include <LibLocale/Forward.h> namespace Locale { )~~~"); @@ -202,10 +202,10 @@ static ErrorOr<void> generate_unicode_locale_implementation(Core::Stream::Buffer #include <AK/Array.h> #include <AK/StringView.h> #include <AK/Vector.h> +#include <LibLocale/Locale.h> +#include <LibLocale/PluralRules.h> +#include <LibLocale/RelativeTimeFormat.h> #include <LibLocale/RelativeTimeFormatData.h> -#include <LibUnicode/Locale.h> -#include <LibUnicode/PluralRules.h> -#include <LibUnicode/RelativeTimeFormat.h> namespace Locale { )~~~"); diff --git a/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GeneratorUtil.h b/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GeneratorUtil.h index 75aafd5fa0..d9afa5fcda 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GeneratorUtil.h +++ b/Meta/Lagom/Tools/CodeGenerators/LibUnicode/GeneratorUtil.h @@ -23,7 +23,7 @@ #include <LibCore/DirIterator.h> #include <LibCore/File.h> #include <LibCore/Stream.h> -#include <LibUnicode/Locale.h> +#include <LibLocale/Locale.h> template<class T> inline constexpr bool StorageTypeIsList = false; diff --git a/Tests/LibUnicode/TestUnicodeDateTimeFormat.cpp b/Tests/LibUnicode/TestUnicodeDateTimeFormat.cpp index de6c8cd4a7..0ba07fd546 100644 --- a/Tests/LibUnicode/TestUnicodeDateTimeFormat.cpp +++ b/Tests/LibUnicode/TestUnicodeDateTimeFormat.cpp @@ -9,7 +9,7 @@ #include <AK/Array.h> #include <AK/StringView.h> #include <AK/Time.h> -#include <LibUnicode/DateTimeFormat.h> +#include <LibLocale/DateTimeFormat.h> TEST_CASE(time_zone_name) { diff --git a/Tests/LibUnicode/TestUnicodeLocale.cpp b/Tests/LibUnicode/TestUnicodeLocale.cpp index 954c2501e0..0e807075e6 100644 --- a/Tests/LibUnicode/TestUnicodeLocale.cpp +++ b/Tests/LibUnicode/TestUnicodeLocale.cpp @@ -6,7 +6,7 @@ #include <LibTest/TestCase.h> -#include <LibUnicode/Locale.h> +#include <LibLocale/Locale.h> TEST_CASE(is_unicode_language_subtag) { diff --git a/Userland/Applications/ClockSettings/TimeZoneSettingsWidget.cpp b/Userland/Applications/ClockSettings/TimeZoneSettingsWidget.cpp index 20617396b7..25722449e0 100644 --- a/Userland/Applications/ClockSettings/TimeZoneSettingsWidget.cpp +++ b/Userland/Applications/ClockSettings/TimeZoneSettingsWidget.cpp @@ -17,9 +17,9 @@ #include <LibGUI/Painter.h> #include <LibGUI/Process.h> #include <LibGfx/Palette.h> +#include <LibLocale/DateTimeFormat.h> +#include <LibLocale/Locale.h> #include <LibTimeZone/TimeZone.h> -#include <LibUnicode/DateTimeFormat.h> -#include <LibUnicode/Locale.h> #include <math.h> #include <spawn.h> #include <unistd.h> diff --git a/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp b/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp index f1b9ac2bc5..75a407d626 100644 --- a/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/DatePrototype.cpp @@ -24,9 +24,9 @@ #include <LibJS/Runtime/Intl/DateTimeFormatConstructor.h> #include <LibJS/Runtime/Temporal/Instant.h> #include <LibJS/Runtime/Value.h> +#include <LibLocale/DateTimeFormat.h> +#include <LibLocale/Locale.h> #include <LibTimeZone/TimeZone.h> -#include <LibUnicode/DateTimeFormat.h> -#include <LibUnicode/Locale.h> namespace JS { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp index e2a8be9e78..34495b0c5e 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.cpp @@ -15,7 +15,7 @@ #include <LibJS/Runtime/GlobalObject.h> #include <LibJS/Runtime/Intl/AbstractOperations.h> #include <LibJS/Runtime/Intl/Locale.h> -#include <LibUnicode/Locale.h> +#include <LibLocale/Locale.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.h b/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.h index a0647ea77f..326fab3274 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.h +++ b/Userland/Libraries/LibJS/Runtime/Intl/AbstractOperations.h @@ -15,7 +15,7 @@ #include <LibJS/Runtime/Intl/SingleUnitIdentifiers.h> #include <LibJS/Runtime/Temporal/AbstractOperations.h> #include <LibJS/Runtime/Value.h> -#include <LibUnicode/Forward.h> +#include <LibLocale/Forward.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/CollatorConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/CollatorConstructor.cpp index 5baf56d354..968f78ab97 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/CollatorConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/CollatorConstructor.cpp @@ -10,7 +10,7 @@ #include <LibJS/Runtime/Intl/AbstractOperations.h> #include <LibJS/Runtime/Intl/Collator.h> #include <LibJS/Runtime/Intl/CollatorConstructor.h> -#include <LibUnicode/Locale.h> +#include <LibLocale/Locale.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp index 168f96ff72..22643b6dc2 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.cpp @@ -15,8 +15,8 @@ #include <LibJS/Runtime/Intl/NumberFormatConstructor.h> #include <LibJS/Runtime/NativeFunction.h> #include <LibJS/Runtime/Utf16String.h> -#include <LibUnicode/Locale.h> -#include <LibUnicode/NumberFormat.h> +#include <LibLocale/Locale.h> +#include <LibLocale/NumberFormat.h> #include <math.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.h b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.h index 1e82b48cd1..fffdcdfd21 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.h +++ b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormat.h @@ -15,7 +15,7 @@ #include <LibJS/Runtime/Completion.h> #include <LibJS/Runtime/Intl/AbstractOperations.h> #include <LibJS/Runtime/Object.h> -#include <LibUnicode/DateTimeFormat.h> +#include <LibLocale/DateTimeFormat.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp index 6ce652cadf..8c772d22bf 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatConstructor.cpp @@ -11,8 +11,8 @@ #include <LibJS/Runtime/Intl/DateTimeFormat.h> #include <LibJS/Runtime/Intl/DateTimeFormatConstructor.h> #include <LibJS/Runtime/Temporal/TimeZone.h> -#include <LibUnicode/DateTimeFormat.h> -#include <LibUnicode/Locale.h> +#include <LibLocale/DateTimeFormat.h> +#include <LibLocale/Locale.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatPrototype.cpp index 5b55acaa90..4afb1192f6 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/DateTimeFormatPrototype.cpp @@ -9,7 +9,7 @@ #include <LibJS/Runtime/GlobalObject.h> #include <LibJS/Runtime/Intl/DateTimeFormatFunction.h> #include <LibJS/Runtime/Intl/DateTimeFormatPrototype.h> -#include <LibUnicode/DateTimeFormat.h> +#include <LibLocale/DateTimeFormat.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNames.h b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNames.h index 99e833637f..ebe0a55f9c 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNames.h +++ b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNames.h @@ -10,7 +10,7 @@ #include <AK/String.h> #include <AK/StringView.h> #include <LibJS/Runtime/Object.h> -#include <LibUnicode/Locale.h> +#include <LibLocale/Locale.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp index 4f5cb0d358..aa4de4ef26 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesConstructor.cpp @@ -11,7 +11,7 @@ #include <LibJS/Runtime/Intl/DisplayNames.h> #include <LibJS/Runtime/Intl/DisplayNamesConstructor.h> #include <LibJS/Runtime/Temporal/AbstractOperations.h> -#include <LibUnicode/Locale.h> +#include <LibLocale/Locale.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp index 07230e4779..22e4484e7a 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/DisplayNamesPrototype.cpp @@ -9,7 +9,7 @@ #include <LibJS/Runtime/Intl/AbstractOperations.h> #include <LibJS/Runtime/Intl/DisplayNames.h> #include <LibJS/Runtime/Intl/DisplayNamesPrototype.h> -#include <LibUnicode/Locale.h> +#include <LibLocale/Locale.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp b/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp index a954621cbe..6cb12be114 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/Intl.cpp @@ -20,9 +20,9 @@ #include <LibJS/Runtime/Intl/RelativeTimeFormatConstructor.h> #include <LibJS/Runtime/Intl/SegmenterConstructor.h> #include <LibJS/Runtime/Temporal/TimeZone.h> -#include <LibUnicode/DateTimeFormat.h> -#include <LibUnicode/Locale.h> -#include <LibUnicode/NumberFormat.h> +#include <LibLocale/DateTimeFormat.h> +#include <LibLocale/Locale.h> +#include <LibLocale/NumberFormat.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/ListFormat.h b/Userland/Libraries/LibJS/Runtime/Intl/ListFormat.h index 6a3d835a9a..29e44d63e3 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/ListFormat.h +++ b/Userland/Libraries/LibJS/Runtime/Intl/ListFormat.h @@ -13,7 +13,7 @@ #include <AK/Vector.h> #include <LibJS/Runtime/Intl/AbstractOperations.h> #include <LibJS/Runtime/Object.h> -#include <LibUnicode/Locale.h> +#include <LibLocale/Locale.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/Locale.cpp b/Userland/Libraries/LibJS/Runtime/Intl/Locale.cpp index 6efede1be7..e62d37ed47 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/Locale.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/Locale.cpp @@ -8,9 +8,9 @@ #include <LibJS/Runtime/Array.h> #include <LibJS/Runtime/GlobalObject.h> #include <LibJS/Runtime/Intl/Locale.h> +#include <LibLocale/DateTimeFormat.h> +#include <LibLocale/Locale.h> #include <LibTimeZone/TimeZone.h> -#include <LibUnicode/DateTimeFormat.h> -#include <LibUnicode/Locale.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/Locale.h b/Userland/Libraries/LibJS/Runtime/Intl/Locale.h index 1ebdfa1e4f..571e175403 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/Locale.h +++ b/Userland/Libraries/LibJS/Runtime/Intl/Locale.h @@ -13,7 +13,7 @@ #include <LibJS/Runtime/Completion.h> #include <LibJS/Runtime/Object.h> #include <LibJS/Runtime/Value.h> -#include <LibUnicode/Forward.h> +#include <LibLocale/Forward.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp index 117ee6f7ec..89c6bf3517 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/LocaleConstructor.cpp @@ -11,7 +11,7 @@ #include <LibJS/Runtime/Intl/AbstractOperations.h> #include <LibJS/Runtime/Intl/Locale.h> #include <LibJS/Runtime/Intl/LocaleConstructor.h> -#include <LibUnicode/Locale.h> +#include <LibLocale/Locale.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp index 38c3e26b64..9e57070227 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/LocalePrototype.cpp @@ -9,7 +9,7 @@ #include <LibJS/Runtime/GlobalObject.h> #include <LibJS/Runtime/Intl/Locale.h> #include <LibJS/Runtime/Intl/LocalePrototype.h> -#include <LibUnicode/Locale.h> +#include <LibLocale/Locale.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.h b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.h index 8c7d6a88e2..c6ad87960e 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.h +++ b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormat.h @@ -12,8 +12,8 @@ #include <LibJS/Runtime/Intl/AbstractOperations.h> #include <LibJS/Runtime/Intl/MathematicalValue.h> #include <LibJS/Runtime/Object.h> -#include <LibUnicode/Locale.h> -#include <LibUnicode/NumberFormat.h> +#include <LibLocale/Locale.h> +#include <LibLocale/NumberFormat.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp index 5cb4709473..429ee1a88d 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/NumberFormatConstructor.cpp @@ -9,7 +9,7 @@ #include <LibJS/Runtime/GlobalObject.h> #include <LibJS/Runtime/Intl/AbstractOperations.h> #include <LibJS/Runtime/Intl/NumberFormatConstructor.h> -#include <LibUnicode/Locale.h> +#include <LibLocale/Locale.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/PluralRules.h b/Userland/Libraries/LibJS/Runtime/Intl/PluralRules.h index 7a5751d710..2259d40620 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/PluralRules.h +++ b/Userland/Libraries/LibJS/Runtime/Intl/PluralRules.h @@ -11,7 +11,7 @@ #include <LibJS/Runtime/Completion.h> #include <LibJS/Runtime/Intl/NumberFormat.h> #include <LibJS/Runtime/Object.h> -#include <LibUnicode/PluralRules.h> +#include <LibLocale/PluralRules.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/PluralRulesPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Intl/PluralRulesPrototype.cpp index db94ebcfa5..f6c948cf8c 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/PluralRulesPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/PluralRulesPrototype.cpp @@ -8,7 +8,7 @@ #include <LibJS/Runtime/Array.h> #include <LibJS/Runtime/GlobalObject.h> #include <LibJS/Runtime/Intl/PluralRulesPrototype.h> -#include <LibUnicode/PluralRules.h> +#include <LibLocale/PluralRules.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.h b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.h index d1431aed45..4c1615cd2d 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.h +++ b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormat.h @@ -12,8 +12,8 @@ #include <LibJS/Runtime/Completion.h> #include <LibJS/Runtime/Intl/AbstractOperations.h> #include <LibJS/Runtime/Object.h> -#include <LibUnicode/Locale.h> -#include <LibUnicode/RelativeTimeFormat.h> +#include <LibLocale/Locale.h> +#include <LibLocale/RelativeTimeFormat.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp index c30c7713e4..976db150cf 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/Intl/RelativeTimeFormatConstructor.cpp @@ -14,7 +14,7 @@ #include <LibJS/Runtime/Intl/PluralRulesConstructor.h> #include <LibJS/Runtime/Intl/RelativeTimeFormat.h> #include <LibJS/Runtime/Intl/RelativeTimeFormatConstructor.h> -#include <LibUnicode/Locale.h> +#include <LibLocale/Locale.h> namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp b/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp index 41cf8a6e92..6a2847da6b 100644 --- a/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/StringPrototype.cpp @@ -26,8 +26,8 @@ #include <LibJS/Runtime/StringPrototype.h> #include <LibJS/Runtime/Utf16String.h> #include <LibJS/Runtime/Value.h> +#include <LibLocale/Locale.h> #include <LibUnicode/CharacterTypes.h> -#include <LibUnicode/Locale.h> #include <string.h> namespace JS { diff --git a/Userland/Libraries/LibUnicode/DateTimeFormat.cpp b/Userland/Libraries/LibLocale/DateTimeFormat.cpp index 95e0b86fd2..ee01d66fed 100644 --- a/Userland/Libraries/LibUnicode/DateTimeFormat.cpp +++ b/Userland/Libraries/LibLocale/DateTimeFormat.cpp @@ -6,9 +6,9 @@ #include <AK/Array.h> #include <AK/StringBuilder.h> -#include <LibUnicode/DateTimeFormat.h> -#include <LibUnicode/Locale.h> -#include <LibUnicode/NumberFormat.h> +#include <LibLocale/DateTimeFormat.h> +#include <LibLocale/Locale.h> +#include <LibLocale/NumberFormat.h> #include <stdlib.h> namespace Locale { diff --git a/Userland/Libraries/LibUnicode/DateTimeFormat.h b/Userland/Libraries/LibLocale/DateTimeFormat.h index a0a96b0f39..b948eae9a7 100644 --- a/Userland/Libraries/LibUnicode/DateTimeFormat.h +++ b/Userland/Libraries/LibLocale/DateTimeFormat.h @@ -12,8 +12,8 @@ #include <AK/Time.h> #include <AK/Types.h> #include <AK/Vector.h> +#include <LibLocale/Forward.h> #include <LibTimeZone/TimeZone.h> -#include <LibUnicode/Forward.h> namespace Locale { diff --git a/Userland/Libraries/LibLocale/Forward.h b/Userland/Libraries/LibLocale/Forward.h new file mode 100644 index 0000000000..b503f19feb --- /dev/null +++ b/Userland/Libraries/LibLocale/Forward.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2021-2022, Tim Flynn <trflynn89@serenityos.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include <AK/Types.h> + +namespace Locale { + +enum class CalendarFormatType : u8; +enum class CalendarPatternStyle : u8; +enum class CalendarSymbol : u8; +enum class CharacterOrder : u8; +enum class CompactNumberFormatType : u8; +enum class Condition : u8; +enum class Currency : u16; +enum class DateField : u8; +enum class DayPeriod : u8; +enum class Era : u8; +enum class FirstDayRegion : u8; +enum class HourCycle : u8; +enum class HourCycleRegion : u16; +enum class Key : u8; +enum class KeywordCalendar : u8; +enum class KeywordCollation : u8; +enum class KeywordColCaseFirst : u8; +enum class KeywordColNumeric : u8; +enum class KeywordHours : u8; +enum class KeywordNumbers : u8; +enum class Language : u16; +enum class ListPatternType : u8; +enum class Locale : u16; +enum class MinimumDaysRegion : u8; +enum class Month : u8; +enum class NumericSymbol : u8; +enum class PluralCategory : u8; +enum class ScriptTag : u8; +enum class StandardNumberFormatType : u8; +enum class Style : u8; +enum class Territory : u8; +enum class Weekday : u8; +enum class WeekendEndRegion : u8; +enum class WeekendStartRegion : u8; + +struct CalendarFormat; +struct CalendarPattern; +struct CalendarRangePattern; +struct Keyword; +struct LanguageID; +struct ListPatterns; +struct LocaleExtension; +struct LocaleID; +struct NumberFormat; +struct NumberGroupings; +struct OtherExtension; +struct PluralOperands; +struct TransformedExtension; +struct TransformedField; + +} diff --git a/Userland/Libraries/LibUnicode/Locale.cpp b/Userland/Libraries/LibLocale/Locale.cpp index bad62682da..474058232a 100644 --- a/Userland/Libraries/LibUnicode/Locale.cpp +++ b/Userland/Libraries/LibLocale/Locale.cpp @@ -8,9 +8,9 @@ #include <AK/GenericLexer.h> #include <AK/QuickSort.h> #include <AK/StringBuilder.h> +#include <LibLocale/DateTimeFormat.h> +#include <LibLocale/Locale.h> #include <LibUnicode/CharacterTypes.h> -#include <LibUnicode/DateTimeFormat.h> -#include <LibUnicode/Locale.h> namespace Locale { diff --git a/Userland/Libraries/LibUnicode/Locale.h b/Userland/Libraries/LibLocale/Locale.h index 451a76acd1..111275e378 100644 --- a/Userland/Libraries/LibUnicode/Locale.h +++ b/Userland/Libraries/LibLocale/Locale.h @@ -12,7 +12,7 @@ #include <AK/StringView.h> #include <AK/Variant.h> #include <AK/Vector.h> -#include <LibUnicode/Forward.h> +#include <LibLocale/Forward.h> namespace Locale { diff --git a/Userland/Libraries/LibUnicode/NumberFormat.cpp b/Userland/Libraries/LibLocale/NumberFormat.cpp index 8200439db1..39a09c58e5 100644 --- a/Userland/Libraries/LibUnicode/NumberFormat.cpp +++ b/Userland/Libraries/LibLocale/NumberFormat.cpp @@ -6,9 +6,9 @@ #include <AK/CharacterTypes.h> #include <AK/Utf8View.h> +#include <LibLocale/Locale.h> +#include <LibLocale/NumberFormat.h> #include <LibUnicode/CharacterTypes.h> -#include <LibUnicode/Locale.h> -#include <LibUnicode/NumberFormat.h> #if ENABLE_UNICODE_DATA # include <LibUnicode/UnicodeData.h> diff --git a/Userland/Libraries/LibUnicode/NumberFormat.h b/Userland/Libraries/LibLocale/NumberFormat.h index a8fdaca649..baadc3c8db 100644 --- a/Userland/Libraries/LibUnicode/NumberFormat.h +++ b/Userland/Libraries/LibLocale/NumberFormat.h @@ -10,8 +10,8 @@ #include <AK/String.h> #include <AK/StringView.h> #include <AK/Vector.h> -#include <LibUnicode/Forward.h> -#include <LibUnicode/PluralRules.h> +#include <LibLocale/Forward.h> +#include <LibLocale/PluralRules.h> namespace Locale { diff --git a/Userland/Libraries/LibUnicode/PluralRules.cpp b/Userland/Libraries/LibLocale/PluralRules.cpp index 11c88e2ac5..1f56f6cbe7 100644 --- a/Userland/Libraries/LibUnicode/PluralRules.cpp +++ b/Userland/Libraries/LibLocale/PluralRules.cpp @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include <LibUnicode/PluralRules.h> +#include <LibLocale/PluralRules.h> namespace Locale { diff --git a/Userland/Libraries/LibUnicode/PluralRules.h b/Userland/Libraries/LibLocale/PluralRules.h index 7bfdccc81e..0f93234b7f 100644 --- a/Userland/Libraries/LibUnicode/PluralRules.h +++ b/Userland/Libraries/LibLocale/PluralRules.h @@ -9,7 +9,7 @@ #include <AK/Assertions.h> #include <AK/StringView.h> #include <AK/Types.h> -#include <LibUnicode/Forward.h> +#include <LibLocale/Forward.h> namespace Locale { diff --git a/Userland/Libraries/LibUnicode/RelativeTimeFormat.cpp b/Userland/Libraries/LibLocale/RelativeTimeFormat.cpp index 16a06336ee..7f5e24d13e 100644 --- a/Userland/Libraries/LibUnicode/RelativeTimeFormat.cpp +++ b/Userland/Libraries/LibLocale/RelativeTimeFormat.cpp @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include <LibUnicode/RelativeTimeFormat.h> +#include <LibLocale/RelativeTimeFormat.h> namespace Locale { diff --git a/Userland/Libraries/LibUnicode/RelativeTimeFormat.h b/Userland/Libraries/LibLocale/RelativeTimeFormat.h index bc59c18407..1a1914328b 100644 --- a/Userland/Libraries/LibUnicode/RelativeTimeFormat.h +++ b/Userland/Libraries/LibLocale/RelativeTimeFormat.h @@ -9,8 +9,8 @@ #include <AK/Optional.h> #include <AK/StringView.h> #include <AK/Vector.h> -#include <LibUnicode/Forward.h> -#include <LibUnicode/Locale.h> +#include <LibLocale/Forward.h> +#include <LibLocale/Locale.h> namespace Locale { diff --git a/Userland/Libraries/LibUnicode/CMakeLists.txt b/Userland/Libraries/LibUnicode/CMakeLists.txt index 8bafca34ab..7779a8e06c 100644 --- a/Userland/Libraries/LibUnicode/CMakeLists.txt +++ b/Userland/Libraries/LibUnicode/CMakeLists.txt @@ -3,11 +3,11 @@ include(${SerenityOS_SOURCE_DIR}/Meta/CMake/unicode_data.cmake) set(SOURCES CharacterTypes.cpp CurrencyCode.cpp - DateTimeFormat.cpp - Locale.cpp - NumberFormat.cpp - PluralRules.cpp - RelativeTimeFormat.cpp + ../LibLocale/DateTimeFormat.cpp + ../LibLocale/Locale.cpp + ../LibLocale/NumberFormat.cpp + ../LibLocale/PluralRules.cpp + ../LibLocale/RelativeTimeFormat.cpp ${UNICODE_DATA_SOURCES} ) diff --git a/Userland/Libraries/LibUnicode/CharacterTypes.cpp b/Userland/Libraries/LibUnicode/CharacterTypes.cpp index 465cdd4aba..9a77b4b4be 100644 --- a/Userland/Libraries/LibUnicode/CharacterTypes.cpp +++ b/Userland/Libraries/LibUnicode/CharacterTypes.cpp @@ -10,8 +10,8 @@ #include <AK/Types.h> #include <AK/Utf16View.h> #include <AK/Utf8View.h> +#include <LibLocale/Locale.h> #include <LibUnicode/CharacterTypes.h> -#include <LibUnicode/Locale.h> #if ENABLE_UNICODE_DATA # include <LibUnicode/UnicodeData.h> diff --git a/Userland/Libraries/LibUnicode/Forward.h b/Userland/Libraries/LibUnicode/Forward.h index a228999d48..c3b08d3088 100644 --- a/Userland/Libraries/LibUnicode/Forward.h +++ b/Userland/Libraries/LibUnicode/Forward.h @@ -22,57 +22,3 @@ struct CurrencyCode; struct SpecialCasing; } - -namespace Locale { - -enum class CalendarFormatType : u8; -enum class CalendarPatternStyle : u8; -enum class CalendarSymbol : u8; -enum class CharacterOrder : u8; -enum class CompactNumberFormatType : u8; -enum class Condition : u8; -enum class Currency : u16; -enum class DateField : u8; -enum class DayPeriod : u8; -enum class Era : u8; -enum class FirstDayRegion : u8; -enum class HourCycle : u8; -enum class HourCycleRegion : u16; -enum class Key : u8; -enum class KeywordCalendar : u8; -enum class KeywordCollation : u8; -enum class KeywordColCaseFirst : u8; -enum class KeywordColNumeric : u8; -enum class KeywordHours : u8; -enum class KeywordNumbers : u8; -enum class Language : u16; -enum class ListPatternType : u8; -enum class Locale : u16; -enum class MinimumDaysRegion : u8; -enum class Month : u8; -enum class NumericSymbol : u8; -enum class PluralCategory : u8; -enum class ScriptTag : u8; -enum class StandardNumberFormatType : u8; -enum class Style : u8; -enum class Territory : u8; -enum class Weekday : u8; -enum class WeekendEndRegion : u8; -enum class WeekendStartRegion : u8; - -struct CalendarFormat; -struct CalendarPattern; -struct CalendarRangePattern; -struct Keyword; -struct LanguageID; -struct ListPatterns; -struct LocaleExtension; -struct LocaleID; -struct NumberFormat; -struct NumberGroupings; -struct OtherExtension; -struct PluralOperands; -struct TransformedExtension; -struct TransformedField; - -} |