[niepce/lr-import: 6/20] Fix gettext issues by upgrading it 0.7.0)




commit 70546c42d4b293621ae00642fc3b7b23d70fbfba
Author: Hubert Figuière <hub figuiere net>
Date:   Sat Nov 13 22:48:16 2021 -0500

    Fix gettext issues by upgrading it 0.7.0)

 Cargo.lock                            | 119 +++++++++++++++++++++++++++++++++-
 crates/npc-engine/Cargo.toml          |   2 +-
 crates/npc-engine/src/bin/importlr.rs |   5 --
 3 files changed, 118 insertions(+), 8 deletions(-)
---
diff --git a/Cargo.lock b/Cargo.lock
index a0c7e53..ce38620 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -13,6 +13,15 @@ dependencies = [
  "version_check",
 ]
 
+[[package]]
+name = "aho-corasick"
+version = "0.7.18"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
+dependencies = [
+ "memchr",
+]
+
 [[package]]
 name = "ansi_term"
 version = "0.11.0"
@@ -86,6 +95,12 @@ version = "1.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
 
+[[package]]
+name = "block"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
+
 [[package]]
 name = "cache-padded"
 version = "1.1.1"
@@ -135,6 +150,12 @@ dependencies = [
  "toml",
 ]
 
+[[package]]
+name = "cc"
+version = "1.0.72"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee"
+
 [[package]]
 name = "cfg-expr"
 version = "0.8.1"
@@ -367,6 +388,26 @@ version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "823d7e5d0e615f937c7629991bc9f4c090ad582303214c38744e1a16d6ffbe5e"
 
+[[package]]
+name = "gettext-rs"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "e49ea8a8fad198aaa1f9655a2524b64b70eb06b2f3ff37da407566c93054f364"
+dependencies = [
+ "gettext-sys",
+ "locale_config",
+]
+
+[[package]]
+name = "gettext-sys"
+version = "0.21.2"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "afa9e06ab9e7514cc9ae668ea3b71ea1536259d767dff0289ac23ad134f99929"
+dependencies = [
+ "cc",
+ "temp-dir",
+]
+
 [[package]]
 name = "gexiv2-sys"
 version = "1.1.2"
@@ -615,6 +656,19 @@ dependencies = [
  "vcpkg",
 ]
 
+[[package]]
+name = "locale_config"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "08d2c35b16f4483f6c26f0e4e9550717a2f6575bcd6f12a53ff0c490a94a6934"
+dependencies = [
+ "lazy_static",
+ "objc",
+ "objc-foundation",
+ "regex",
+ "winapi",
+]
+
 [[package]]
 name = "log"
 version = "0.4.14"
@@ -635,6 +689,15 @@ dependencies = [
  "rusqlite",
 ]
 
+[[package]]
+name = "malloc_buf"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
+dependencies = [
+ "libc",
+]
+
 [[package]]
 name = "maplit"
 version = "1.0.2"
@@ -691,7 +754,7 @@ dependencies = [
  "gdk",
  "gdk-pixbuf",
  "gdk-pixbuf-sys",
- "gettext-rs",
+ "gettext-rs 0.3.0",
  "gio",
  "gio-sys",
  "glib",
@@ -714,7 +777,7 @@ dependencies = [
  "exempi",
  "gdk-pixbuf",
  "gdk-pixbuf-sys",
- "gettext-rs",
+ "gettext-rs 0.7.0",
  "glib",
  "lazy_static",
  "libc",
@@ -781,6 +844,35 @@ dependencies = [
  "autocfg",
 ]
 
+[[package]]
+name = "objc"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
+dependencies = [
+ "malloc_buf",
+]
+
+[[package]]
+name = "objc-foundation"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"
+dependencies = [
+ "block",
+ "objc",
+ "objc_id",
+]
+
+[[package]]
+name = "objc_id"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b"
+dependencies = [
+ "objc",
+]
+
 [[package]]
 name = "once_cell"
 version = "1.8.0"
@@ -973,6 +1065,23 @@ dependencies = [
  "bitflags",
 ]
 
+[[package]]
+name = "regex"
+version = "1.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.25"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
+
 [[package]]
 name = "remove_dir_all"
 version = "0.5.3"
@@ -1137,6 +1246,12 @@ dependencies = [
  "version-compare",
 ]
 
+[[package]]
+name = "temp-dir"
+version = "0.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "af547b166dd1ea4b472165569fc456cfb6818116f854690b0ff205e636523dab"
+
 [[package]]
 name = "tempfile"
 version = "3.2.0"
diff --git a/crates/npc-engine/Cargo.toml b/crates/npc-engine/Cargo.toml
index ddf7792..0c2090a 100644
--- a/crates/npc-engine/Cargo.toml
+++ b/crates/npc-engine/Cargo.toml
@@ -14,7 +14,7 @@ async-channel = "1.6.1"
 clap = { version = "2.33.3", optional = true }
 chrono = "0.4.19"
 exempi = { version = "2.6.0", git = "https://github.com/hfiguiere/exempi-rs.git";, rev="99e8ba5" }
-gettext-rs = "0.3.0"
+gettext-rs = "0.7.0"
 gdk-pixbuf-sys = "*"
 gdk-pixbuf = "*"
 glib = "*"
diff --git a/crates/npc-engine/src/bin/importlr.rs b/crates/npc-engine/src/bin/importlr.rs
index b26d8a6..ba5aa77 100644
--- a/crates/npc-engine/src/bin/importlr.rs
+++ b/crates/npc-engine/src/bin/importlr.rs
@@ -1,5 +1,4 @@
 use clap::{App, Arg};
-use gettextrs::*;
 use std::path::PathBuf;
 
 use npc_engine::importer::LibraryImporter;
@@ -7,10 +6,6 @@ use npc_engine::importer::LrImporter;
 use npc_engine::libraryclient::LibraryClient;
 
 fn main() {
-    setlocale(LocaleCategory::LcAll, "");
-    bind_textdomain_codeset("importlr", "UTF-8");
-    textdomain("importlr");
-
     npc_fwk::init();
 
     let matches = App::new("LrImporter")


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