From 8f0ff9fea443a986ce16a4ced28928f284c7a4b6 Mon Sep 17 00:00:00 2001 From: Sinan-Karakaya Date: Wed, 8 May 2024 23:10:41 +0200 Subject: [PATCH 1/2] fix(build): removed Wextra not working with MSVC --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc69a15..1cc5ac7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ project(cpp-i18n LANGUAGES CXX) set(CMAKE_CXX_STANDARD 20) if (NOT WIN32) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fdiagnostics-color=always") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fdiagnostics-color=always") endif() # Build library @@ -14,7 +14,7 @@ add_subdirectory(src) # Fetch dependencies include(FetchContent) -FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz) +FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz) FetchContent_MakeAvailable(json) target_link_libraries(cpp-i18n PRIVATE nlohmann_json::nlohmann_json) From 4b76c50230c47d521d73d67ab004574012b8498e Mon Sep 17 00:00:00 2001 From: Sinan-Karakaya Date: Wed, 8 May 2024 23:11:16 +0200 Subject: [PATCH 2/2] doc(README): bumped version --- README.md | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 8bccd76..5bff9d2 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,17 @@ ## Introduction -cpp-i18n is a C++ library for internationalization (i18n) of C++ applications, which was made to be as simple as +cpp-i18n is a C++ library for internationalization (i18n) of C++ applications, which was made to be as simple as possible to use, with easy integration into existing projects. - [Installation](#installation) - - [CMake](#cmake) + - [CMake](#cmake) - [Usage](#usage) - - [Basic usage](#basic-usage) - - [Multiple languages](#multiple-languages) - - [Multiple files](#multiple-files) - - [Custom locales directory path](#custom-locales-directory-path) - - [Parameters in localized strings](#parameters-in-localized-strings) + - [Basic usage](#basic-usage) + - [Multiple languages](#multiple-languages) + - [Multiple files](#multiple-files) + - [Custom locales directory path](#custom-locales-directory-path) + - [Parameters in localized strings](#parameters-in-localized-strings) - [Planned features](#planned-features) ## Installation @@ -27,7 +27,7 @@ include(FetchContent) FetchContent_Declare( cpp-i18n GIT_REPOSITORY https://github.com/Sinan-Karakaya/cpp-i18n.git - GIT_TAG v0.1.0 + GIT_TAG v0.2.2 ) FetchContent_MakeAvailable(cpp-i18n) @@ -44,9 +44,10 @@ target_link_libraries( ### Basic usage assets/locales/en/basic.json + ```json { - "hello": "Hello, world!" + "hello": "Hello, world!" } ``` @@ -67,16 +68,18 @@ int main() ### Multiple languages assets/locales/en/basic.json + ```json { - "hello": "Hello, world!" + "hello": "Hello, world!" } ``` assets/locales/fr/basic.json + ```json { - "hello": "Bonjour, monde!" + "hello": "Bonjour, monde!" } ``` @@ -99,16 +102,18 @@ int main() ### Multiple files assets/locales/en/basic.json + ```json { - "hello": "Hello, world!" + "hello": "Hello, world!" } ``` assets/locales/en/other.json + ```json { - "goodbye": "Goodbye, world!" + "goodbye": "Goodbye, world!" } ``` @@ -128,9 +133,10 @@ int main() ### Custom locales directory path path/to/locales/en/basic.json + ```json { - "hello": "Hello, world!" + "hello": "Hello, world!" } ``` @@ -151,9 +157,10 @@ int main() ### Parameters in localized strings assets/locales/en/parameters.json + ```json { - "hello": "Hello, my name is {{ name }}!" + "hello": "Hello, my name is {{ name }}!" } ``` @@ -177,4 +184,4 @@ The format `{{ paramName }}` is space sensitive, so `{{paramName}}` will not wor - [ ] Support for pluralization [(#2)](https://github.com/Sinan-Karakaya/cpp-i18n/issues/2) - [ ] Support for localization of numbers, dates, currencies, etc... [(#4)](https://github.com/Sinan-Karakaya/cpp-i18n/issues/4) - [ ] Support for automatically detecting multiple locales [(#3)](https://github.com/Sinan-Karakaya/cpp-i18n/issues/3) -- [X] Support for parameters in localized strings \ No newline at end of file +- [x] Support for parameters in localized strings