import 'package:fis_i18n/i18n.dart';

class PrinterTranslate {
  static String translate(String key) {
    return i18nBook.isCurrentChinese
        ? _Chinese.translate(key)
        : _English.translate(key);
  }
}

class _Chinese {
  static const Map<String, String> _map = {
    "ReferToPrinter": "参考打印机",
    "Portrait": "纵向",
    "Landscape": "横向",
    "Letter": "信纸",
    "Tabloid": "大报纸",
    "Legal": "法律文书",
    "Statement": "声明",
    "Executive": "行政管理",
    "A3": "A3",
    "A4": "A4",
    "A5": "A5",
    "B4 (JIS)": "B4 (JIS)",
    "B5 (JIS)": "B5 (JIS)",
    "Folio": "Folio",
    "Envelope #10": "信封#10",
    "Envelope DL": "信封DL",
    "Envelope C5": "信封C5",
    "Envelope Monarch": "信封Monarch",
    "Japanese Postcard": "日式明信片",
    "A2": "A2",
    "A6": "A6",
    "Japanese Envelope Kaku #2": "日式信封Kaku #2",
    "Japanese Envelope Chou #3": "日式信封Chou #3",
    "Double Japan Postcard Rotated": "旋转双倍日式明信片",
    "B6 (JIS)": "B6 (JIS)",
    "A1": "A1",
    "4x6": "4x6",
    "5x7": "5x7",
    "8x10": "8x10",
    "8.46x12.4": "8.46x12.4",
    "10x11": "10x11",
    "11x15": "11x15",
    "8开(267x388mm)": "8开(267x388mm)",
    "16开(194x267mm)": "16开(194x267mm)",
    "8开(270x390mm)": "8开(270x390mm)",
    "16开(195x270mm)": "16开(195x270mm)"
  };

  static String translate(String key) {
    return _map[key] ?? key;
  }
}

class _English {
  static const Map<String, String> _map = {
    "ReferToPrinter": "Refer to Printer",
    "Portrait": "Portrait",
    "Landscape": "Landscape",
    "Letter": "Letter",
    "Tabloid": "Tabloid",
    "Legal": "Legal",
    "Statement": "Statement",
    "Executive": "Executive",
    "A3": "A3",
    "A4": "A4",
    "A5": "A5",
    "B4 (JIS)": "B4 (JIS)",
    "B5 (JIS)": "B5 (JIS)",
    "Folio": "Folio",
    "Envelope #10": "Envelope #10",
    "Envelope DL": "Envelope DL",
    "Envelope C5": "Envelope C5",
    "Envelope Monarch": "Envelope Monarch",
    "Japanese Postcard": "Japanese Postcard",
    "A2": "A2",
    "A6": "A6",
    "Japanese Envelope Kaku #2": "Japanese Envelope Kaku #2",
    "Japanese Envelope Chou #3": "Japanese Envelope Chou #3",
    "Double Japan Postcard Rotated": "Double Japanese Postcard Rotated",
    "B6 (JIS)": "B6 (JIS)",
    "A1": "A1",
    "4x6": "4x6",
    "5x7": "5x7",
    "8x10": "8x10",
    "8.46x12.4": "8.46x12.4",
    "10x11": "10x11",
    "11x15": "11x15",
    "8开(267x388mm)": "8 Open (267x388mm)",
    "16开(194x267mm)": "16 Open (194x267mm)",
    "8开(270x390mm)": "8 Open (270x390mm)",
    "16开(195x270mm)": "16 Open (195x270mm)",
    "A4封页": "A4 envelope"
  };

  static String translate(String key) {
    return _map[key] ?? key;
  }
}
