Skip to content

Commit a6e8bdb

Browse files
committed
fix: translate "image" cli field
1 parent b579853 commit a6e8bdb

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

locales/en-US/cli.ftl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ cli-ascii-true-color =
7676
7777
If set to auto: true color will be enabled if supported by the terminal
7878
79+
# IMAGE
80+
cli-image-image = Path to the IMAGE file
81+
cli-image-image_protocol = Which image PROTOCOL to use
82+
cli-image-color_resolution = VALUE of color resolution to use with SIXEL backend
83+
7984
# VISUALS
8085
cli-visuals-heading = VISUALS
8186
cli-visuals-no-color-palette = Hides the color palette

locales/ru-RU/cli.ftl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ cli-ascii-true-color =
7676
7777
Если установлено в auto: true-color будет включен, если он поддерживается терминалом
7878
79+
# IMAGE
80+
cli-image-image = Путь к файлу ИЗОБРАЖЕНИЯ
81+
cli-image-image_protocol = Какой ПРОТОКОЛ изображения использовать
82+
cli-image-color_resolution = ЗНАЧЕНИЕ разрешения цвета, используемого с бэкендом SIXEL
83+
7984
# VISUALS
8085
cli-visuals-heading = ВИЗУАЛЬНЫЕ ЭЛЕМЕНТЫ
8186
cli-visuals-no-color-palette = Скрывает цветовую палитру

src/cli.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,9 @@ pub struct AsciiCliOptions {
166166
#[derive(Clone, Debug, Args, PartialEq, Eq)]
167167
#[command(next_help_heading = "IMAGE")]
168168
pub struct ImageCliOptions {
169-
/// Path to the IMAGE file
170-
#[arg(long, short, value_name = tr!("cli-value-image"), value_hint = ValueHint::FilePath)]
169+
#[arg(long, short, value_name = tr!("cli-value-image"), value_hint = ValueHint::FilePath, help = tr!("cli-image-image"))]
171170
pub image: Option<PathBuf>,
172-
/// Which image PROTOCOL to use
173-
#[arg(long, value_enum, requires = "image", value_name = tr!("cli-value-protocol"))]
171+
#[arg(long, value_enum, requires = "image", value_name = tr!("cli-value-protocol"), help = tr!("cli-image-image_protocol"))]
174172
pub image_protocol: Option<ImageProtocol>,
175173
/// VALUE of color resolution to use with SIXEL backend
176174
#[arg(
@@ -179,7 +177,8 @@ pub struct ImageCliOptions {
179177
requires = "image",
180178
default_value_t = 16usize,
181179
value_parser = PossibleValuesParser::new(COLOR_RESOLUTIONS)
182-
.map(|s| s.parse::<usize>().unwrap())
180+
.map(|s| s.parse::<usize>().unwrap()),
181+
help = tr!("cli-image-color_resolution")
183182
)]
184183
pub color_resolution: usize,
185184
}

0 commit comments

Comments
 (0)