i18n_ui 0.2.125

i18n 翻译进度终端界面:交互式并发面板与非交互逐行输出
// DON'T EDIT, GEN BY i18ngen

pub use ::i18n_nt::{Cfg, I18N};

#[doc(hidden)]
pub use self::_i18n_::_ctor_::*;
pub use self::_i18n_::Lang;
use self::_i18n_::{self as ø, Cow, IntoVal};

/// Preferred entry: import `T` directly (`use i18n::T;` -> `T.key()`), following global [`I18N`] (`I18N << lang` switches all crates); for per-task language isolation, bind any struct via `let t = I18n << lang;` (or `SubStruct << lang`).
pub static T: I18n = I18n {
  ui: Ui { ø: I18N }
};

#[derive(Clone, Copy, Debug)]
pub struct I18n {
  pub ui: Ui,
}

#[derive(Clone, Copy, Debug)]
pub struct Ui {
  ø: Cfg,
}

// ../i18n/zh/ui.nt
impl Ui {
  /// 已取消
  pub fn cancel(&self) -> &'static str {
    ø::ui::cancel(self.ø)
  }
  /// 估算中
  pub fn estimating(&self) -> &'static str {
    ø::ui::estimating(self.ø)
  }
  /// 剩余 $\[eta\]
  pub fn eta<'a>(&self, eta: impl IntoVal<'a>) -> Cow<'static, str> {
    ø::ui::eta(self.ø, eta)
  }
  /// 翻译 $\[ok\]  缓存 $\[hit\]  失败 $\[fail\]  用时 $\[dur\]
  pub fn summary<'a>(
    &self,
    ok: impl IntoVal<'a>,
    hit: impl IntoVal<'a>,
    fail: impl IntoVal<'a>,
    dur: impl IntoVal<'a>,
  ) -> Cow<'static, str> {
    ø::ui::summary(self.ø, ok, hit, fail, dur)
  }
  /// 开始 $\[tag\]
  pub fn start<'a>(&self, tag: impl IntoVal<'a>) -> Cow<'static, str> {
    ø::ui::start(self.ø, tag)
  }
  /// 重试 $\[tag\] │ 第 $\[nth\]/$\[total\] 轮 $\[base\] 失败: $\[err\]
  pub fn retry<'a>(
    &self,
    tag: impl IntoVal<'a>,
    nth: impl IntoVal<'a>,
    total: impl IntoVal<'a>,
    base: impl IntoVal<'a>,
    err: impl IntoVal<'a>,
  ) -> Cow<'static, str> {
    ø::ui::retry(self.ø, tag, nth, total, base, err)
  }
  /// 完成 $\[dur\]  $\[src\] → $\[dst\]  $\[count\]  $\[percent\]  $\[eta\]
  pub fn done<'a>(
    &self,
    dur: impl IntoVal<'a>,
    src: impl IntoVal<'a>,
    dst: impl IntoVal<'a>,
    count: impl IntoVal<'a>,
    percent: impl IntoVal<'a>,
    eta: impl IntoVal<'a>,
  ) -> Cow<'static, str> {
    ø::ui::done(self.ø, dur, src, dst, count, percent, eta)
  }
  /// 失败 $\[tag\]  $\[msg\]
  pub fn fail<'a>(&self, tag: impl IntoVal<'a>, msg: impl IntoVal<'a>) -> Cow<'static, str> {
    ø::ui::fail(self.ø, tag, msg)
  }
  /// 提示 $\[text\]
  pub fn log<'a>(&self, text: impl IntoVal<'a>) -> Cow<'static, str> {
    ø::ui::log(self.ø, text)
  }
  /// 汇总 $\[summary\]
  pub fn total<'a>(&self, summary: impl IntoVal<'a>) -> Cow<'static, str> {
    ø::ui::total(self.ø, summary)
  }
  /// 提示
  pub fn note(&self) -> &'static str {
    ø::ui::note(self.ø)
  }
  /// 完成
  pub fn ok(&self) -> &'static str {
    ø::ui::ok(self.ø)
  }
  /// 失败
  pub fn bad(&self) -> &'static str {
    ø::ui::bad(self.ø)
  }
  /// 重试 $\[n\]
  pub fn retry_n<'a>(&self, n: impl IntoVal<'a>) -> Cow<'static, str> {
    ø::ui::retry_n(self.ø, n)
  }
  /// 缓存 $\[n\]
  pub fn count_cache<'a>(&self, n: impl IntoVal<'a>) -> Cow<'static, str> {
    ø::ui::count_cache(self.ø, n)
  }
  /// 重试 $\[n\]
  pub fn count_retry<'a>(&self, n: impl IntoVal<'a>) -> Cow<'static, str> {
    ø::ui::count_retry(self.ø, n)
  }
  /// 失败 $\[n\]
  pub fn count_fail<'a>(&self, n: impl IntoVal<'a>) -> Cow<'static, str> {
    ø::ui::count_fail(self.ø, n)
  }
  /// 扫描缓存…
  pub fn scan(&self) -> &'static str {
    ø::ui::scan(self.ø)
  }
  /// 第 $\[n\]/$\[total\] 轮
  pub fn retry_badge<'a>(&self, n: impl IntoVal<'a>, total: impl IntoVal<'a>) -> Cow<'static, str> {
    ø::ui::retry_badge(self.ø, n, total)
  }
  /// 后重试
  pub fn retry_after(&self) -> &'static str {
    ø::ui::retry_after(self.ø)
  }
  /// 重连中…
  pub fn reconnect(&self) -> &'static str {
    ø::ui::reconnect(self.ø)
  }
  /// 汇总
  pub fn summary_label(&self) -> &'static str {
    ø::ui::summary_label(self.ø)
  }
  /// 进度界面不可用:$\[err\]
  pub fn no_ui<'a>(&self, err: impl IntoVal<'a>) -> Cow<'static, str> {
    ø::ui::no_ui(self.ø, err)
  }
}

::i18n_nt_macro::include!(fallback = "zh");