util/gettext: Parse unicode escape sequences
Closes #351 Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/426>
This commit is contained in:
parent
3ad5560e2c
commit
0b33553144
12 changed files with 208 additions and 113 deletions
|
|
@ -1,4 +1,5 @@
|
|||
// Copyright (c) 2023-2024 Sophie Herold
|
||||
// Copyright (c) 2024 Fina Wilke
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// Copyright (c) 2023-2024 Sophie Herold
|
||||
// Copyright (c) 2024 Fina Wilke
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2022-2024 Sophie Herold
|
||||
// Copyright (c) 2022 Christopher Davis
|
||||
// Copyright (c) 2022, 2024 Christopher Davis
|
||||
// Copyright (c) 2024 Anders Jonsson
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
// Copyright (c) 2023 FineFindus
|
||||
// Copyright (c) 2023 Huan Nguyen
|
||||
// Copyright (c) 2023 Philipp Kiemle
|
||||
// Copyright (c) 2024 Fina Wilke
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
// Copyright (c) 2022-2024 Sophie Herold
|
||||
// Copyright (c) 2022 Christopher Davis
|
||||
// Copyright (c) 2024 Lukáš Tyrychtr
|
||||
// Copyright (c) 2024 Fina Wilke
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -264,7 +266,7 @@ mod imp {
|
|||
|
||||
if let Some(bit_depth) = metadata.bit_depth() {
|
||||
// Translators: Addition of bit size to format name
|
||||
format.push_str(&gettext_f(", {}\u{202F}bit", [bit_depth.to_string()]));
|
||||
format.push_str(&gettext_f(r", {}\u{202F}bit", [bit_depth.to_string()]));
|
||||
}
|
||||
|
||||
Some(format)
|
||||
|
|
@ -279,7 +281,11 @@ mod imp {
|
|||
_ => {
|
||||
let (width, height) = image.image_size();
|
||||
if width > 0 && height > 0 {
|
||||
Some(format!("{width}\u{202F}\u{D7}\u{202F}{height}"))
|
||||
// Translators: Image "<width> x <height>"
|
||||
Some(gettext_f(
|
||||
r"{}\u{202F}\u{D7}\u{202F}{}",
|
||||
[width.to_string(), height.to_string()],
|
||||
))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
// Copyright (c) 2023 Alice Mikhaylenko
|
||||
// Copyright (c) 2023 Christopher Davis
|
||||
// Copyright (c) 2023 Lubosz Sarnecki
|
||||
// Copyright (c) 2024 Fina Wilke
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue