#!/usr/bin/perl -T
# Written by Steven Shiau <steven _at_ nchc org tw> for DRBL
# License: GPL
#

$lang_charset = 'iso-8859-1';

%delimiter =
   (
   dash_line => '------------------------------------------------------',
   star_line => '******************************************************',
   exclamation_line => "!!!!!!!!!!!!!!!!!!!!!!!!!",
   warning_line => "!!!!!!!!!!!!!!!!!!!!!! Warning !!!!!!!!!!!!!!!!!!!!!!!",
   );

%lang_text =
   (  
   Say        => 'Say',
   or         => 'or',
   seconds    => 'seconds',
   WARNING    => 'WARNING',
   Accept     => 'Accept',
   as         => 'as',
   login      => 'login',
   clear      => 'clear',
   of         => 'of',
   logout     => 'logout',
   page       => 'page',
   move       => 'move',
   date       => 'date',
   size       => 'size',
   type       => 'type',
   filename   => 'filename',
   encoding   => 'encoding',
   download   => 'download',
   cancel     => 'cancel',
   continue   => 'continue',
   for        => 'for',
   save       => 'save',
   add        => 'add',
   delete     => 'delete',
   uninstall  => 'uninstall',
   done       => 'done',
   finish     => 'finish',
   space      => 'space',
   );

%lang_word =
   (
   please_enter => "please enter",
   to_deploy_them => "to deploy them",
   root_passwd => "root\'s password",
   initial_digit => "initial digit",
   unable_to_find_the => "Unable to find the",
   program_stop => "Program stop",
   );

%lang_deploy =
   (
   interactive_mode_prompt => 'The interactive mode let you supply the information of your DRBL environment.',
   domain_unset_prompt => 'DOMAIN is unset, please enter DOMAIN now:',
   domain_prompt => 'Please enter DNS domain (such as drbl.sf.net):',
   nisdomain_unset_prompt => 'NISDOMAIN is unset, please enter NISDOMAIN now:',
   nisdomain_prompt => 'Please enter NIS/YP domain name:',
   not_allowed_domainname => 'is not allowed as a DOMAINNAME, enter it again!',
   not_allowed_nisdomainname => 'is not allowed as a NISDOMAINNAME, enter it again!',
   set_domain_as => 'Set DOMAIN as',
   enter_client_hostname_prefix => "Please enter the client hostname prefix:\nThis prefix is used to automatically create hostname for clients. If you want to overwrite some or all automatically created hostnames, press Ctrl-C to quit this program now, edit /etc/drbl/client-ip-hostname, then run this program again.",
   not_allowed_hostname => 'is not allowed as a client hostname prefix, enter it again!',
   set_client_hostname_prefix => 'Set the client hostname prefix as',
   no_NIC_setup => 'You did NOT setup any Internet network setting for the network cards for clients (such as the IP address of eth1, eth2...), or something wrong!',
   configured_nic => 'Configured ethernet card(s) found in your system:',
   we_can_NOT_continue => 'We can NOT continue...',
   but_not_private_IP_or_configured => 'but it\'s not private IP, not well configured, or not up now!!!',
   enter_public_IP_for_the_client => "Enter the public IP for this client",
   its_IP_in_DRBL_is => "Its IP in DRBL is",
   wrong_entered_IP => "The IP address you entered is wrong, please enter it again!",
   enter_gateway_for_client => "Enter the gateway for this client",
   enter_netmask_for_client => "Enter the netmask for this client",
   wrong_entered_netmask => "The NETMASK you entered is wrong, please enter it again!",
   set_client_public_IP_as => "We will set clients' public IP addresses network parameters as:",
   we_will_skip => 'We will skip',
   for_internet_access_prompt => 'Which ethernet port in this server is for public Internet accsess, not for DRBL connection?',
   drbl_website_prompt => 'See http://drbl.nchc.org.tw/redhat or http://drbl.sf.net/redhat for details.',
   ethernet_port_for_internet => 'The ethernet port for Internet access is:',
   ethernet_port_for_DRBL => 'The ethernet port(s) for DRBL environment: ',
   only_1_IP_for_eth0 => 'Only 1 IP address for eth0, we will not use eth0 for DRBL environment!',
   no_DRBL_port => 'No ethernet port is available for DRBL environment!',
   saved_mac_address_files_in_etc => "These files are saved in directory $drbl_syscfg.",
   collect_MAC_prompt => 
          "Now we can collect the MAC address of clients!\n".
          "If you want to let the DHCP service in DRBL server offer same IP address to client every time when client boot, and you never did this procedure, you should do it now!\n".
          "If you already have those MAC addresses of clients, you can put them into different group files (These files number is the same number of networks cards for DRBL service). In this case, you can skip this step.\n".
          "This step helps you to record the MAC addresses of clients, then divide them into different groups. It will save your time and reduce the typos.\n".
	  "The MAC addresses will be recorded turn by turn according to the boot of clients,\n".
	  "and they will be put into different files according to the network card in server, file name will be like macadr-eth1.txt, macadr-eth2.txt... You can find them in directory $drbl_syscfg.\n".
	  "Please boot the clients by order, make sure they boot from etherboot or PXE!\n". 
          "Do you want to collect them?",
   ok_let_do_it => 'OK! Let\'s do it!',
   you_are_not_root => 'You are not root',
   ok_let_continue => 'OK! Let\'s continue...',
   fix_eth_IP_prompt => "Do you want to let the DHCP service in DRBL server offer same IP address to the client every time when client boots (If you want this function, you have to collect the MAC addresses of clients, and save them in file(s) (as in the previous procedure)). This is for the clients connected to DRBL server's ethernet network interface",
   MAC_file_prompt => "OK! Please tell me the file name which contains the MAC address of clients line by line for",
   range_prompt => "OK! Let's continue, we will set the IP address of clients by \"first boot gets IP first\" instead of fixed one!",
   client_number_connected_to_eth => "How many DRBL clients (PC for students) connected to DRBL server's ethernet network interface",
   enter_the_no => "Please enter the number",
   the_value_you_set => "The final number in the last set of digits in the client's IP address is",
   set_the_IP_connected_to_eth => "We will set the IP address for the clients connected to DRBL server's ethernet network interface",
   do_you_want_to_continue => "Do you want to continue?",
   reenter_or_accept => "to re-enter it, or any other letter to accept this value and go on!",
   filename_you_set => "The file name you set is",
   by_MAC_file => "By the MAC address file you set, the IP addresses for the clients connected to DRBL server's ethernet network interface",
   let_restart_it_again => "OK, let's restart it again!",
   layout_for_DRBL => "The Layout for your DRBL environment:",
   swap_prompt =>
              "If there is a local harddrive with swap partition or writable file system in your client machine,\n".
              "do you want to use that swap partition or create a swap file in  the writable filesystem so that client has more memory to use? (This step will NOT destroy any data in that harddisk)",
   try_to_create_swap =>
                "OK! We will try to create a swap space for your client if it has a local hard drive!",
   max_swap_size =>
                "What's the maximun size (Megabytes) for the swap space?\n".
                "We will try to allocate the swap space for you, if it's not enough, 60% of the free space will be used.",
   mode_for_client_init =>
              "Which mode do you want the clients to use after they boot?\n".
              "\"1\": Graphic mode (X window system) (default),\n".
              "\"2\": Text mode.",
   client_text_mode => "The clients will use text mode when they boot.",
   client_graphic_mode => "The clients will enter graphic mode after booting.",
   login_mode_for_client =>
                  "Which mode do you want when client boots in graphic mode?\n".
                  "0: normal login, 1: auto login, 2: timed login",
   auto_login => "The clients will auto login when they boot.",
   created_account_for_auto_login =>
                      "accounts will be created for the client machines to auto login.\n".
		      "The auto login ID is same as the hostname of client.\n".
                      "The information of accounts and password will be listed in file",
   time_for_countdown => "How many seconds for countdown?",
   timed_login_prompt => "The clients will auto login if timed after",
   normal_login_prompt => "The clients will wait for user to login when they boot.",
   keep_client_setting_question => "Do you want to keep the old setting of existing DRBL clients if they exist?",
   remove_client_setting => "We will remove all the setting of the DRBL clients if they already exist.",
   keep_client_setting => "We will try to keep the setting of the DRBL clients if they already exist.",
   set_client_root_passwd => "Do you want to set the root's password for clients instead of using same root's password copied from server? (For better security)",
   whats_client_root_passwd => "New root's password for clients (It will not be echoed in the screen)?",
   set_client_pxelinux_passwd => "Do you want to set the pxelinux password for clients so that when client boots, a password must be entered to startup (For better security)",
   whats_client_pxelinux_passwd => "New pxelinux password for clients (It will not be echoed in the screen)?",
   retype_root_passwd => "Retype new password (It will not be echoed in the screen).",
   sorry_passwd_not_match => "Sorry, passwords do not match",
   sorry_passwd_can_not_empty => "Sorry, password can not be empty",
   set_client_alias_IP =>
      "By using alias interface, every client can have 2 IPs,\n".
      "one of them is private IP for clients connected to DRBL server, and the other is public IP for clients directly connected to WAN from switch!\n".
      "Do you want to setup public IP for clients?",
   searching_installed_drbl_packages => "Searching the installed packages for DRBL server...This might take several minutes...",
   no_drbl_server_package_found =>
	      "No DRBL server package is installed!!!\n". 
	      "You should run another script (drblsrv -i) to setup the DRBL server first!!!, Otherwise the system will NOT work!!!\n".
	      "Are you sure you want to continue? Say \"yes\" or \"y\" to continue, or any other letter to quit!",
   but_you_will_see_errors => "But you will see a lot of error messages...!!!",
   smart_decision => "OK, smart decision, I will quit now!",
   finished_searching_installed_drbl_packages => "Finished searching the installed packages for DRBL server.",
   note_for_keep_client_setting => "Note! You are trying to keep the setting of DRBL clients if they exist, sometimes DRBL clients will go wrong when you finish this script! If so, rebooting those DRBL clients should make them work!",
   press_enter_to_continue => "Press Enter to continue... ",
   no_deploy_prompt =>
	      "All config files are created in this working directory,\n".
	      "but they are NOT deployed to system! \n".
	      "If you want to deploy them to system, do not use option \"-n\" or \"--no_deploy\"",
   ready_to_deploy =>
	      "We are now ready to deploy the files to system! \n".
	      "Do you want to continue?",
   overwrite_firewall_rule => "Warning! If you go on, your firewall rules will be overwritten during the setup!",
   backup_firewall_rule => "The original rules will be backuped as iptables.drblsave in system config directory (/etc/sysconfig or /etc/default).",
   oh_quit_now => "Oh, I will quit now!",
   accept_or_enter => "Say \"Y\" to accept or other letter to enter each one by one...",
   failed_to_open_file => "Failed to open file",
   #
   analyzing_rpm_info => "Analyzing the rpm packages info... This might take several minutes...",
   no_drbl_server_package => "No DRBL server package is installed!!!",
   apt_pkg_not_installed =>  "\"apt\" package is NOT installed!!!", 
   we_are_now_ready_to => "We are now ready to",
   the_files_for_DRBL_server => "the files for DRBL server!",
   say_yes_to_continue_other_to_quit => "Say \"yes\" or \"y\" to continue, or any other letter to quit!",
   say_no_to_quit_other_to_continue => "Say \"no\" or \"n\" to quit, or any other letter to continue!",
   syncing_flush => "Now syncing - flush filesystem buffers...", 
   install_and_upgrade => "install and upgrade",
   IP_start_prompt => "What is the initial number do you want to use in the last set of digits in the IP (i.e. the initial value of d in the IP address a.b.c.d) for DRBL clients connected to this ethernet port",
   client_no_in_MAC_file => "The clients number in this file is",
   not_initial_value => "The one you input in NOT valid for initial value! Please enter it again!!!",
   can_not_be_the_last_IP => "can NOT be the last set of digits in IP!!!",
   can_not_be_the_first_IP => "can NOT be the first set of digits in IP!!!",
   set_client_system_select => "Do you want to set the boot prompt for clients?",
   use_graphic_pxelinux_menu => "Do you want to use graphic background for PXE menu when client boots?",
   note_for_use_graphic_pxelinux_menu => "Note! If you use graphical PXELinux menu, however client fails to boot, you can switch to text mode by running \"switch-pxe-bg-mode -m text\".",
   whats_client_system_boot_timeout => "How many 1/10 sec is the boot prompt timeout for clients?",
   sorry_timeout_must_be_number => "The timeout must be a number (say 70)!!!",
   unable_to_get_ethx_IP => "Unable to get the IP address!!!\ You must set a static class C private IP address (such as 192.168.1.1), and it can NOT be a floating IP address (like DHCP client)! This error is on network card:",
   program_stop => "Program stop!!!",
   open_thin_client_option => 
        "Do you want to let DRBL clients have an option to run terminal mode? i.e. you want to let that client run remote display (which will mostly use resources of server), say \"Y\" here.\n".
        "Note!\n".
	"0. If you say yes to this option, this will be a very limited environment for client, i.e. NO local access for USB, CD, audio, printer, etc. in client.\n".
	"1. If your server is not powerful, say \"no\" here.\n".
	"2. By saying \"yes\" here, we will turn on xdmcp,\n".
	"It is never a safe thing to turn on that.  Setting up /etc/hosts.allow and /etc/hosts.deny to only allow local access is another alternative but not the safest.\n".
	"Firewalling port 177 is the safest if you wish to have xdmcp on.\n".
	"Read the manual for more notes on the security of XDMCP.\n".
	"Please set it by yourself!\n".
	"3. If you say \"yes\" here, you might have to restart your desktop environment manager (gdm/kdm) later, remember to save your data before you close applications!\n".
	"Do you want to let client has an option to run terminal mode?",
   server_kernel_nfsd_support => "The running kernel in the server supports",
   change_kernel_notes => "Note! If you change the running kernel in the server, and not sure whether the kernel supports NFS over udp or tcp, you'd better to re-run \"drblpush -i\" again to avoid the client boots in failure!",
   hint_for_answer => "Hint! When a yes/no option is available, the default value is uppercase, Ex. (y/N), the default is \"N\", when you press \"Enter\", it will use \"N\". If you are not sure which one to choose, you can just press \"Enter\" key.",
   hint_for_detect_MAC => "If you want use the static IP address for DRBL clients, you must run \"drblpush\" in interactive mode (with -i option) and collect the MAC addresses of clients!",
   illegal_char_in_MAC => "The MAC address files contain illegal character",
   fix_wrong_MAC_file => "Please check and modify the MAC address file you entered.",
   unable_to_find_public_IP => "The public IP address of this server is NOT found.",
   available_eth_ports => "Available ethernet ports in this server",
   is_not_in_the_lists => "is not in the lists",
   enter_it_again => "Please enter it again",
   the_eth_port_you_choose_for_wan => "The ethernet port you choose for the WAN connection",
   set_DBN_client_audio_plugdev_etc_open_to_all => "Do you want to let audio, cdrom, floppy, video and plugdev (like USB device) open to all users in the DRBL client? If yes, we will add all the users to those device groups in the server and client.",
   use_random_password => "Do you want to use *RANDOM* password for auto login accounts?",
   enter_password_for_autologin_accounts => "Enter the password for auto login accounts.",
   whats_client_autologin_passwd => "What's the password of auto login account for clients (It will not be echoed in the screen)?",
   retype_autologin_passwd => "Retype the password (It will not be echoed in the screen).",
   clonezilla_box_mode_for_client => "Do you want to use Clonezilla box mode only? If so, some functions about DRBL will be suppressed, and you will have an elegant mode to do clonezilla. Note! In this mode, the setting and config files of client will not be saved to the DRBL server! They just use once and will vanish after the machine shutdowns!",
   clonezilla_box_mode_is_set => "Clonezilla box mode is set, an elegant mode for clonezilla is on the way!",
   full_clonezilla_mode_is_set => "Full clonezilla mode is set!",
   clonezilla_box_mode_not_set => "Clonezilla box mode is NOT set, you will have the full functions of DRBL box!",
   no_clonezilla_in_system => "No Clonezilla is the system!",
   class_c_IP_for_multicast_clonezilla => "If you want to use multicast clonezilla, you have to use private class C (192.168.*.*)! Otherwise the performance of multicast clone will be terribly worse!",
   drbl_ssi_mode_for_client => "Do you want to use DRBL SSI (Single system image) mode? If yes, the loading and necessary disk space of server will be lighter. NOTE! In this mode, (1) The client machine memory at least 256 MB. (2) The setting and config files of client will not be saved to the DRBL server! They are just used once and will vanish after the machine shutdowns! Besides, if you modify any file in the template client (located in $drblroot), you have to run drbl-gen-ssi-files to create the template tarball in $drbl_common_root/drbl_ssi/. (3) If you want to provide some file to overwrite the setting in the template tarball when client boots, check $drbl_common_root/drbl_ssi/clients/00_README for more details.",
   which_drbl_mode_for_client => "In the system, there are 3 modes for diskless linux services:\n[0] Full DRBL mode, every client has its own NFS based /etc and /var.\n[1] DRBL SSI (Single system image) mode, every client uses tmpfs based /etc and /var. In this mode, the loading and necessary disk space of server will be lighter. NOTE! (a) The client machine memory is recommended at least 256 MB. (b) The setting and config files of client will not be saved to the DRBL server! They are just used once and will vanish after the machine shutdowns! Besides, if you modify any file in the template client (located in $drblroot), you have to run drbl-gen-ssi-files to create the template tarball in $drbl_common_root/drbl_ssi/. (c) If you want to provide some file to overwrite the setting in the template tarball when client boots, check $drbl_common_root/drbl_ssi/clients/00_README for more details.\n[2] I do NOT want to provide diskless Linux service to client.\nWhich mode do you prefer?",
   drbl_ssi_mode_is_set => "DRBL SSI mode is set, an elegant mode for DRBL is on the way!",
   full_drbl_mode_is_set => "Full DRBL mode is chosen!",
   no_drbl_mode_in_system => "No diskless Linux for client is the system.",
   where_is_ocs_img_repo_dir => "When using clonezilla, which directory in this server you want to store the saved image (Please use absolute path, and do NOT assign it under /mnt/, /media/ or /tmp/)?",
   not_allowed_ocs_img_repo_dir => "is not an allowed directory to save clonezilla images, please enter it again.",
   drbl_server_as_NAT_server => "Do you want to let DRBL server as a NAT server? If not, your DRBL client will NOT be able to access Internat.",
   drbl_server_is_NOT_NAT_server => "This DRBL server does NOT provide NAT service, so your DRBL client will NOT be able to access Internat.",
   both_drbl_clonezilla_are_none => "Both drbl and clonezilla mode are assigned as not available, only very limited functions (such as netinstall, if you install those necessary files, and drbl-sl) are available in this system!",
   are_you_sure_you_want_to_continue => "Are you sure you want to continue?",
   # Tag on 2010/12/13
   which_clonezilla_mode_for_client => "In the system, there are 4 modes available for clonezilla:\n[0] Full Clonezilla mode, every client has its own NFS based /etc and /var.\n[1] Clonezilla box mode, every client uses tmpfs based /etc and /var. In this mode, the loading and necessary disk space of server will be lighter than that in Full Clonezilla mode. Note! In Clonezilla box mode, the setting and config files of client will not be saved to the DRBL server! They just use once and will vanish after the machine shutdowns!\n[2] I do NOT want clonezilla.\n[3] Use Clonezilla live as the OS (Operating System) of clients (Testing).\nWhich mode do you prefer?",
   clonezilla_live_mode_is_set => "Use Clonezilla live as the OS (Operating System) of clients when running Clonezilla job.",
   which_clonezilla_live_branch => "What's the Clonezilla live release branch for the clients?\n[0]: stable (Debian-based)\n[1]: testing (Debian-based)\n[2]: alternative stable (Ubuntu-based)\n[3]: alternative testing (Ubuntu-based)\nIf unsure, choose [2]: alternative stable.",
   which_live_client_cpu_mode => "What's the CPU arch for the clients when running Clonezilla job with Clonezilla live?\n[0]: i586\n[1]: i686\n[2]: amd64\nIf unsure, choose i586.",
   which_live_client_cpu_mode_for_ubuntu => "What's the CPU arch for the clients when running Clonezilla job with Clonezilla live?\n[0]: i386\n[1]: amd64\nIf unsure, choose i386.",
   live_client_branch_set=> "The Clonezilla live branch is chosen as",
   live_client_cpu_arch_is_set => "The CPU arch for clients when running Clonezilla job",
   # Tag on 2017/01/26
   only_one_network_card_in_system => "///WARNING/// Only one configured network card was found in this system.",
   found_dhcp_service_on_nic => "Found DHCP service on the network interface",
   do_you_want_to_lease_ip_addr_from_existing_dhcp_srv => "Do you want to lease IP address from the existing DHCP service? The DHCP server IP address is",
   will_use_available_ip_addr_from_dhcp_srv => "'If so, we will use the available IP address leased from DHCP server. If not, we will run a DHCP service in this machine, which might conflict with the existing one. Therefore it is recommended to choose yes.",
   note_you_have_to_make_sure_enough_no_of_ip_addr => "//NOTE// If you choose 'yes', you have to make sure your DHCP server provides enough number of IP address for all the clients. Besides, this mechanism is risky because all the PXE or uEFI network booting clients will enter DRBL or Clonezilla mode. Please make sure this is what you want.",
   failed_to_detect_dhcp_service => "Failed to find any DHCP service on this network card",
   do_you_want_to_try_it_again => "Do you want to try it again?",
   mark_the_end_of_lang =>"."
   );
