# Chinese translations for minetest package. # Copyright (C) 2015 THE minetest'S COPYRIGHT HOLDER # This file is distributed under the same license as the minetest package. # Automatically generated, 2015. # msgid "" msgstr "" "Project-Id-Version: minetest\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-10-24 20:28+0200\n" "PO-Revision-Date: 2015-09-17 12:48+0200\n" "Last-Translator: Jeff Huang \n" "Language-Team: Chinese (Taiwan) \n" "Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 2.4-dev\n" #: builtin/fstk/ui.lua msgid "An error occured in a Lua script, such as a mod:" msgstr "在 Lua 指令稿中發生錯誤,像是 mod:" #: builtin/fstk/ui.lua msgid "An error occured:" msgstr "發生錯誤:" #: builtin/fstk/ui.lua msgid "Main menu" msgstr "主選單" #: builtin/fstk/ui.lua builtin/mainmenu/store.lua msgid "Ok" msgstr "確定" #: builtin/fstk/ui.lua msgid "Reconnect" msgstr "重新連線" #: builtin/fstk/ui.lua msgid "The server has requested a reconnect:" msgstr "伺服器已要求重新連線:" #: builtin/mainmenu/common.lua src/game.cpp msgid "Loading..." msgstr "正在載入..." #: builtin/mainmenu/common.lua #, fuzzy msgid "Protocol version mismatch. " msgstr "協定版本不符合,伺服器 " #: builtin/mainmenu/common.lua msgid "Server enforces protocol version $1. " msgstr "" #: builtin/mainmenu/common.lua msgid "Server supports protocol versions between $1 and $2. " msgstr "" #: builtin/mainmenu/common.lua msgid "Try reenabling public serverlist and check your internet connection." msgstr "嘗試重新啟用公共伺服器清單並檢查您的網際網路連線。" #: builtin/mainmenu/common.lua msgid "We only support protocol version $1." msgstr "" #: builtin/mainmenu/common.lua msgid "We support protocol versions between version $1 and $2." msgstr "" #: builtin/mainmenu/dlg_config_world.lua builtin/mainmenu/dlg_create_world.lua #: builtin/mainmenu/dlg_rename_modpack.lua builtin/mainmenu/tab_settings.lua #: src/guiKeyChangeMenu.cpp src/keycode.cpp msgid "Cancel" msgstr "取消" #: builtin/mainmenu/dlg_config_world.lua builtin/mainmenu/tab_mods.lua msgid "Depends:" msgstr "依賴:" #: builtin/mainmenu/dlg_config_world.lua msgid "Disable MP" msgstr "停用 MP" #: builtin/mainmenu/dlg_config_world.lua msgid "Enable MP" msgstr "啟用 MP" #: builtin/mainmenu/dlg_config_world.lua msgid "Enable all" msgstr "啟用全部" #: builtin/mainmenu/dlg_config_world.lua msgid "" "Failed to enable mod \"$1\" as it contains disallowed characters. Only " "chararacters [a-z0-9_] are allowed." msgstr "" "啟用 mod 「$1」 失敗,因為其包含了不合法的字元。只有 字元 [a-z0-9_] 才是可用" "的。" #: builtin/mainmenu/dlg_config_world.lua msgid "Hide Game" msgstr "隱藏遊戲" #: builtin/mainmenu/dlg_config_world.lua msgid "Hide mp content" msgstr "隱藏 mp 內容" #: builtin/mainmenu/dlg_config_world.lua msgid "Mod:" msgstr "Mod:" #: builtin/mainmenu/dlg_config_world.lua builtin/mainmenu/tab_settings.lua #: src/guiKeyChangeMenu.cpp msgid "Save" msgstr "儲存" #: builtin/mainmenu/dlg_config_world.lua msgid "World:" msgstr "世界:" #: builtin/mainmenu/dlg_config_world.lua msgid "enabled" msgstr "已啟用" #: builtin/mainmenu/dlg_create_world.lua msgid "A world named \"$1\" already exists" msgstr "名為「$1」的世界已存在" #: builtin/mainmenu/dlg_create_world.lua msgid "Create" msgstr "建立" #: builtin/mainmenu/dlg_create_world.lua msgid "Download a subgame, such as minetest_game, from minetest.net" msgstr "從 minetest.net 下載一個子遊戲,像是 minetest_game" #: builtin/mainmenu/dlg_create_world.lua msgid "Download one from minetest.net" msgstr "從 minetest.net 下載一個" #: builtin/mainmenu/dlg_create_world.lua src/settings_translation_file.cpp msgid "Game" msgstr "遊戲" #: builtin/mainmenu/dlg_create_world.lua src/settings_translation_file.cpp msgid "Mapgen" msgstr "地圖產生器" #: builtin/mainmenu/dlg_create_world.lua msgid "No worldname given or no game selected" msgstr "未給予世界遊戲或是未選取遊戲" #: builtin/mainmenu/dlg_create_world.lua msgid "Seed" msgstr "種子" #: builtin/mainmenu/dlg_create_world.lua msgid "Warning: The minimal development test is meant for developers." msgstr "警告:最小化的開發測試僅供開發者使用。" #: builtin/mainmenu/dlg_create_world.lua msgid "World name" msgstr "世界遊戲" #: builtin/mainmenu/dlg_create_world.lua msgid "You have no subgames installed." msgstr "您沒有安裝子遊戲。" #: builtin/mainmenu/dlg_delete_mod.lua msgid "Are you sure you want to delete \"$1\"?" msgstr "您確定您要刪除「$1」嗎?" #: builtin/mainmenu/dlg_delete_mod.lua msgid "Modmgr: failed to delete \"$1\"" msgstr "Mod 管理員:刪除「$1」失敗" #: builtin/mainmenu/dlg_delete_mod.lua msgid "Modmgr: invalid modpath \"$1\"" msgstr "Mod 管理員:無效的 mod 路徑「$1」" #: builtin/mainmenu/dlg_delete_mod.lua msgid "No of course not!" msgstr "不,絕對不是!" #: builtin/mainmenu/dlg_delete_mod.lua builtin/mainmenu/dlg_delete_world.lua msgid "Yes" msgstr "是" #: builtin/mainmenu/dlg_delete_world.lua msgid "Delete World \"$1\"?" msgstr "刪除世界「$1」?" #: builtin/mainmenu/dlg_delete_world.lua msgid "No" msgstr "否" #: builtin/mainmenu/dlg_rename_modpack.lua src/keycode.cpp msgid "Accept" msgstr "接受" #: builtin/mainmenu/dlg_rename_modpack.lua msgid "Rename Modpack:" msgstr "重新命名 Mod 包:" #: builtin/mainmenu/modmgr.lua msgid "" "\n" "Install Mod: unsupported filetype \"$1\" or broken archive" msgstr "" "\n" "安裝 Mod:不支援的檔案類型「$1」或是損毀的壓縮檔" #: builtin/mainmenu/modmgr.lua msgid "Failed to install $1 to $2" msgstr "安裝 $1 到 $2 失敗" #: builtin/mainmenu/modmgr.lua msgid "Install Mod: file: \"$1\"" msgstr "安裝 Mod:檔案「$1」" #: builtin/mainmenu/modmgr.lua msgid "Install Mod: unable to find real modname for: $1" msgstr "安裝 Mod:找不到 $1 的真實 mod 名稱" #: builtin/mainmenu/modmgr.lua msgid "Install Mod: unable to find suitable foldername for modpack $1" msgstr "安裝 Mod:找不到 mod 包 $1 適合的資料夾名稱" #: builtin/mainmenu/store.lua msgid "Close store" msgstr "關閉商店" #: builtin/mainmenu/store.lua msgid "Downloading $1, please wait..." msgstr "正在下載 $1,請稍候..." #: builtin/mainmenu/store.lua msgid "Install" msgstr "安裝" #: builtin/mainmenu/store.lua msgid "Page $1 of $2" msgstr "$2 的第 $1 頁" #: builtin/mainmenu/store.lua msgid "Rating" msgstr "評分" #: builtin/mainmenu/store.lua msgid "Search" msgstr "搜尋" #: builtin/mainmenu/store.lua msgid "Shortname:" msgstr "短名稱:" #: builtin/mainmenu/store.lua msgid "Successfully installed:" msgstr "已成功安裝:" #: builtin/mainmenu/store.lua msgid "Unsorted" msgstr "未分類" #: builtin/mainmenu/store.lua msgid "re-Install" msgstr "重新安裝" #: builtin/mainmenu/tab_credits.lua msgid "Active Contributors" msgstr "活躍的貢獻者" #: builtin/mainmenu/tab_credits.lua msgid "Core Developers" msgstr "核心開發者" #: builtin/mainmenu/tab_credits.lua msgid "Credits" msgstr "感謝" #: builtin/mainmenu/tab_credits.lua msgid "Previous Contributors" msgstr "先前的貢獻者" #: builtin/mainmenu/tab_credits.lua msgid "Previous Core Developers" msgstr "先前的核心開發者" #: builtin/mainmenu/tab_mods.lua msgid "Installed Mods:" msgstr "已安裝的 Mod:" #: builtin/mainmenu/tab_mods.lua msgid "Mod information:" msgstr "Mod 資訊:" #: builtin/mainmenu/tab_mods.lua builtin/mainmenu/tab_settings.lua msgid "Mods" msgstr "Mods" #: builtin/mainmenu/tab_mods.lua msgid "No mod description available" msgstr "找不到 mod 描述" #: builtin/mainmenu/tab_mods.lua msgid "Rename" msgstr "重新命名" #: builtin/mainmenu/tab_mods.lua msgid "Select Mod File:" msgstr "選取 Mod 檔案:" #: builtin/mainmenu/tab_mods.lua msgid "Uninstall selected mod" msgstr "解除安裝已選取的 mod" #: builtin/mainmenu/tab_mods.lua msgid "Uninstall selected modpack" msgstr "解除安裝已選取的 mod 包" #: builtin/mainmenu/tab_multiplayer.lua msgid "Address / Port :" msgstr "地址/埠:" #: builtin/mainmenu/tab_multiplayer.lua src/settings_translation_file.cpp msgid "Client" msgstr "客戶端" #: builtin/mainmenu/tab_multiplayer.lua builtin/mainmenu/tab_simple_main.lua msgid "Connect" msgstr "連線" #: builtin/mainmenu/tab_multiplayer.lua builtin/mainmenu/tab_simple_main.lua msgid "Creative mode" msgstr "創造模式" #: builtin/mainmenu/tab_multiplayer.lua builtin/mainmenu/tab_simple_main.lua msgid "Damage enabled" msgstr "已啟用傷害" #: builtin/mainmenu/tab_multiplayer.lua builtin/mainmenu/tab_server.lua #: builtin/mainmenu/tab_singleplayer.lua src/keycode.cpp msgid "Delete" msgstr "刪除" #: builtin/mainmenu/tab_multiplayer.lua msgid "Name / Password :" msgstr "名稱/密碼:" #: builtin/mainmenu/tab_multiplayer.lua builtin/mainmenu/tab_simple_main.lua msgid "Public Serverlist" msgstr "公共伺服器清單" #: builtin/mainmenu/tab_multiplayer.lua builtin/mainmenu/tab_simple_main.lua msgid "PvP enabled" msgstr "已啟用 PvP" #: builtin/mainmenu/tab_server.lua msgid "Bind Address" msgstr "綁定地址" #: builtin/mainmenu/tab_server.lua builtin/mainmenu/tab_singleplayer.lua msgid "Configure" msgstr "設定" #: builtin/mainmenu/tab_server.lua builtin/mainmenu/tab_simple_main.lua #: builtin/mainmenu/tab_singleplayer.lua msgid "Creative Mode" msgstr "創造模式" #: builtin/mainmenu/tab_server.lua builtin/mainmenu/tab_simple_main.lua #: builtin/mainmenu/tab_singleplayer.lua msgid "Enable Damage" msgstr "啟用傷害" #: builtin/mainmenu/tab_server.lua builtin/mainmenu/tab_simple_main.lua msgid "Name/Password" msgstr "名稱/密碼" #: builtin/mainmenu/tab_server.lua builtin/mainmenu/tab_singleplayer.lua msgid "New" msgstr "新" #: builtin/mainmenu/tab_server.lua builtin/mainmenu/tab_singleplayer.lua msgid "No world created or selected!" msgstr "未有已建立或已選取的世界!" #: builtin/mainmenu/tab_server.lua msgid "Port" msgstr "埠" #: builtin/mainmenu/tab_server.lua msgid "Public" msgstr "公共" #: builtin/mainmenu/tab_server.lua builtin/mainmenu/tab_singleplayer.lua msgid "Select World:" msgstr "選取世界:" #: builtin/mainmenu/tab_server.lua msgid "Server" msgstr "伺服器" #: builtin/mainmenu/tab_server.lua msgid "Server Port" msgstr "伺服器埠" #: builtin/mainmenu/tab_server.lua msgid "Start Game" msgstr "開始遊戲" #: builtin/mainmenu/tab_settings.lua msgid "\"" msgstr "" #: builtin/mainmenu/tab_settings.lua msgid "(No description of setting given)" msgstr "" #: builtin/mainmenu/tab_settings.lua msgid "Browse" msgstr "" #: builtin/mainmenu/tab_settings.lua msgid "Change keys" msgstr "變更按鍵" #: builtin/mainmenu/tab_settings.lua #, fuzzy msgid "Disabled" msgstr "停用 MP" #: builtin/mainmenu/tab_settings.lua msgid "Edit" msgstr "" #: builtin/mainmenu/tab_settings.lua #, fuzzy msgid "Enabled" msgstr "已啟用" #: builtin/mainmenu/tab_settings.lua msgid "" "Format: , , (, , ), , " ", " msgstr "" #: builtin/mainmenu/tab_settings.lua #, fuzzy msgid "Games" msgstr "遊戲" #: builtin/mainmenu/tab_settings.lua msgid "Optionally the lacunarity can be appended with a leading comma." msgstr "" #: builtin/mainmenu/tab_settings.lua msgid "Please enter a comma seperated list of flags." msgstr "" #: builtin/mainmenu/tab_settings.lua msgid "Please enter a valid integer." msgstr "" #: builtin/mainmenu/tab_settings.lua msgid "Please enter a valid number." msgstr "" #: builtin/mainmenu/tab_settings.lua msgid "Possible values are: " msgstr "" #: builtin/mainmenu/tab_settings.lua msgid "Restore Default" msgstr "" #: builtin/mainmenu/tab_settings.lua #, fuzzy msgid "Select path" msgstr "選擇" #: builtin/mainmenu/tab_settings.lua msgid "Settings" msgstr "設定" #: builtin/mainmenu/tab_settings.lua msgid "Show technical names" msgstr "" #: builtin/mainmenu/tab_settings.lua msgid "The value must be greater than $1." msgstr "" #: builtin/mainmenu/tab_settings.lua msgid "The value must be lower than $1." msgstr "" #: builtin/mainmenu/tab_simple_main.lua msgid "Config mods" msgstr "設定 mod" #: builtin/mainmenu/tab_simple_main.lua msgid "Main" msgstr "主要" #: builtin/mainmenu/tab_simple_main.lua msgid "Start Singleplayer" msgstr "開始單人遊戲" #: builtin/mainmenu/tab_singleplayer.lua src/keycode.cpp msgid "Play" msgstr "玩" #: builtin/mainmenu/tab_singleplayer.lua msgid "Singleplayer" msgstr "單人遊戲" #: builtin/mainmenu/tab_texturepacks.lua msgid "No information available" msgstr "不提供資訊" #: builtin/mainmenu/tab_texturepacks.lua msgid "None" msgstr "無" #: builtin/mainmenu/tab_texturepacks.lua msgid "Select texture pack:" msgstr "選取材質包:" #: builtin/mainmenu/tab_texturepacks.lua msgid "Texturepacks" msgstr "材質包" #: src/client.cpp msgid "Connection timed out." msgstr "連線逾時。" #: src/client.cpp msgid "Done!" msgstr "完成!" #: src/client.cpp msgid "Initializing nodes" msgstr "正在初始化節點" #: src/client.cpp msgid "Initializing nodes..." msgstr "正在初始化節點..." #: src/client.cpp msgid "Item textures..." msgstr "物品材質..." #: src/client.cpp msgid "Loading textures..." msgstr "正在載入材質..." #: src/client.cpp msgid "Rebuilding shaders..." msgstr "正在重新構建著色器..." #: src/client/clientlauncher.cpp msgid "Connection error (timed out?)" msgstr "連線錯誤(逾時?)" #: src/client/clientlauncher.cpp msgid "Could not find or load game \"" msgstr "找不到或無法載入遊戲 \"" #: src/client/clientlauncher.cpp msgid "Invalid gamespec." msgstr "無效的遊戲規格。" #: src/client/clientlauncher.cpp msgid "Main Menu" msgstr "主選單" #: src/client/clientlauncher.cpp msgid "No world selected and no address provided. Nothing to do." msgstr "未有已被選取的世界,且未提供地址。無事可做。" #: src/client/clientlauncher.cpp msgid "Player name too long." msgstr "玩家名稱太長。" #: src/client/clientlauncher.cpp msgid "Provided world path doesn't exist: " msgstr "提供的世界路徑不存在: " #: src/fontengine.cpp msgid "needs_fallback_font" msgstr "needs_fallback_font" #: src/game.cpp msgid "" "\n" "Check debug.txt for details." msgstr "" "\n" "檢視 debug.txt 以取得更多資訊。" #: src/game.cpp msgid "Change Keys" msgstr "變更按鍵" #: src/game.cpp msgid "Change Password" msgstr "變更密碼" #: src/game.cpp msgid "Connecting to server..." msgstr "正在連線至伺服器..." #: src/game.cpp msgid "Continue" msgstr "繼續" #: src/game.cpp msgid "Creating client..." msgstr "正在建立客戶端..." #: src/game.cpp msgid "Creating server..." msgstr "正在建立伺服器..." #: src/game.cpp msgid "" "Default Controls:\n" "- WASD: move\n" "- Space: jump/climb\n" "- Shift: sneak/go down\n" "- Q: drop item\n" "- I: inventory\n" "- Mouse: turn/look\n" "- Mouse left: dig/punch\n" "- Mouse right: place/use\n" "- Mouse wheel: select item\n" "- T: chat\n" msgstr "" "預設控制:\n" "- WASD:移動\n" "- Space:跳躍/攀爬\n" "- Shift:潛行/往下\n" "- Q:丟棄物品\n" "- I:物品欄\n" "- 滑鼠:旋轉/觀看\n" "- 滑鼠左鍵:挖/推擠\n" "- 滑鼠右鍵:放置/使用\n" "- 滑鼠滾輪:選取物品\n" "- T:聊天\n" #: src/game.cpp msgid "" "Default Controls:\n" "No menu visible:\n" "- single tap: button activate\n" "- double tap: place/use\n" "- slide finger: look around\n" "Menu/Inventory visible:\n" "- double tap (outside):\n" " -->close\n" "- touch stack, touch slot:\n" " --> move stack\n" "- touch&drag, tap 2nd finger\n" " --> place single item to slot\n" msgstr "" "預設控制:\n" "無可見選單:\n" "- 輕擊一次:啟動按鈕\n" "- 輕擊兩次:放置/使用\n" "- 滑動手指:轉動視角\n" "檢視選單/物品欄:\n" "- 輕擊兩次(外面):\n" " -->關閉\n" "- 碰觸堆疊,碰觸槽:\n" " --> 移動堆疊\n" "- 碰觸並拖曳,以第二隻手指輕擊\n" " --> 放置單一物品到槽中\n" #: src/game.cpp msgid "Exit to Menu" msgstr "離開到選單" #: src/game.cpp msgid "Exit to OS" msgstr "離開到作業系統" #: src/game.cpp msgid "Item definitions..." msgstr "物品定義..." #: src/game.cpp msgid "KiB/s" msgstr "KiB/s" #: src/game.cpp msgid "Media..." msgstr "媒體..." #: src/game.cpp msgid "MiB/s" msgstr "MiB/s" #: src/game.cpp msgid "Node definitions..." msgstr "節點定義..." #: src/game.cpp src/guiFormSpecMenu.cpp msgid "Proceed" msgstr "開始" #: src/game.cpp msgid "Resolving address..." msgstr "正在解析地址……" #: src/game.cpp msgid "Respawn" msgstr "重生" #: src/game.cpp msgid "Shutting down..." msgstr "關閉..." #: src/game.cpp msgid "Sound Volume" msgstr "音量" #: src/game.cpp msgid "You died." msgstr "您已經死亡。" #: src/guiFormSpecMenu.cpp msgid "Enter " msgstr "輸入 " #: src/guiFormSpecMenu.cpp msgid "ok" msgstr "確定" #: src/guiKeyChangeMenu.cpp msgid "\"Use\" = climb down" msgstr "「使用」=向下攀爬" #: src/guiKeyChangeMenu.cpp msgid "Backward" msgstr "後退" #: src/guiKeyChangeMenu.cpp msgid "Chat" msgstr "聊天" #: src/guiKeyChangeMenu.cpp msgid "Command" msgstr "指令" #: src/guiKeyChangeMenu.cpp msgid "Console" msgstr "終端機" #: src/guiKeyChangeMenu.cpp msgid "Double tap \"jump\" to toggle fly" msgstr "輕擊兩次「跳躍」以切換成飛行" #: src/guiKeyChangeMenu.cpp msgid "Drop" msgstr "丟棄" #: src/guiKeyChangeMenu.cpp msgid "Forward" msgstr "前進" #: src/guiKeyChangeMenu.cpp msgid "Inventory" msgstr "物品欄" #: src/guiKeyChangeMenu.cpp msgid "Jump" msgstr "跳躍" #: src/guiKeyChangeMenu.cpp msgid "Key already in use" msgstr "此按鍵已被使用" #: src/guiKeyChangeMenu.cpp msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)" msgstr "按鍵綁定。(若此選單鎖住了,從 minetest.conf 移除相關參數)" #: src/guiKeyChangeMenu.cpp src/keycode.cpp msgid "Left" msgstr "左" #: src/guiKeyChangeMenu.cpp src/settings_translation_file.cpp msgid "Print stacks" msgstr "印出堆疊" #: src/guiKeyChangeMenu.cpp msgid "Range select" msgstr "選擇範圍" #: src/guiKeyChangeMenu.cpp src/keycode.cpp msgid "Right" msgstr "右" #: src/guiKeyChangeMenu.cpp msgid "Sneak" msgstr "潛行" #: src/guiKeyChangeMenu.cpp msgid "Toggle Cinematic" msgstr "切換過場動畫" #: src/guiKeyChangeMenu.cpp msgid "Toggle fast" msgstr "切換快速" #: src/guiKeyChangeMenu.cpp msgid "Toggle fly" msgstr "切換飛行" #: src/guiKeyChangeMenu.cpp msgid "Toggle noclip" msgstr "切換無省略" #: src/guiKeyChangeMenu.cpp msgid "Use" msgstr "使用" #: src/guiKeyChangeMenu.cpp msgid "press key" msgstr "按下按鍵" #: src/guiPasswordChange.cpp msgid "Change" msgstr "變更" #: src/guiPasswordChange.cpp msgid "Confirm Password" msgstr "確認密碼" #: src/guiPasswordChange.cpp msgid "New Password" msgstr "新密碼" #: src/guiPasswordChange.cpp msgid "Old Password" msgstr "舊密碼" #: src/guiPasswordChange.cpp msgid "Passwords do not match!" msgstr "密碼不符合!" #: src/guiVolumeChange.cpp msgid "Exit" msgstr "離開" #: src/guiVolumeChange.cpp msgid "Sound Volume: " msgstr "音量: " #: src/keycode.cpp msgid "Apps" msgstr "應用程式" #: src/keycode.cpp msgid "Attn" msgstr "Attn" #: src/keycode.cpp msgid "Back" msgstr "Back" #: src/keycode.cpp msgid "Capital" msgstr "大寫" #: src/keycode.cpp msgid "Clear" msgstr "清除" #: src/keycode.cpp msgid "Comma" msgstr "逗號" #: src/keycode.cpp msgid "Control" msgstr "Control" #: src/keycode.cpp msgid "Convert" msgstr "轉換" #: src/keycode.cpp msgid "CrSel" msgstr "CrSel" #: src/keycode.cpp msgid "Down" msgstr "下" #: src/keycode.cpp msgid "End" msgstr "End" #: src/keycode.cpp msgid "Erase OEF" msgstr "抹除 OEF" #: src/keycode.cpp msgid "Escape" msgstr "Escape" #: src/keycode.cpp msgid "ExSel" msgstr "ExSel" #: src/keycode.cpp msgid "Execute" msgstr "執行" #: src/keycode.cpp msgid "Final" msgstr "Final" #: src/keycode.cpp msgid "Help" msgstr "說明" #: src/keycode.cpp msgid "Home" msgstr "Home" #: src/keycode.cpp msgid "Insert" msgstr "插入" #: src/keycode.cpp msgid "Junja" msgstr "Junja" #: src/keycode.cpp msgid "Kana" msgstr "假名" #: src/keycode.cpp msgid "Kanji" msgstr "日文漢字" #: src/keycode.cpp msgid "Left Button" msgstr "左鍵" #: src/keycode.cpp msgid "Left Control" msgstr "左邊 Control" #: src/keycode.cpp msgid "Left Menu" msgstr "左邊選單鍵" #: src/keycode.cpp msgid "Left Shift" msgstr "左邊 Shift" #: src/keycode.cpp msgid "Left Windows" msgstr "左方視窗" #: src/keycode.cpp msgid "Menu" msgstr "選單" #: src/keycode.cpp msgid "Middle Button" msgstr "中鍵" #: src/keycode.cpp msgid "Minus" msgstr "減號" #: src/keycode.cpp msgid "Mode Change" msgstr "模式變更" #: src/keycode.cpp msgid "Next" msgstr "下一個" #: src/keycode.cpp msgid "Nonconvert" msgstr "不轉換" #: src/keycode.cpp msgid "Num Lock" msgstr "Num Lock" #: src/keycode.cpp msgid "Numpad *" msgstr "數字鍵 *" #: src/keycode.cpp msgid "Numpad +" msgstr "數字鍵 +" #: src/keycode.cpp msgid "Numpad -" msgstr "數字鍵 -" #: src/keycode.cpp msgid "Numpad /" msgstr "數字鍵 /" #: src/keycode.cpp msgid "Numpad 0" msgstr "數字鍵 0" #: src/keycode.cpp msgid "Numpad 1" msgstr "數字鍵 1" #: src/keycode.cpp msgid "Numpad 2" msgstr "數字鍵 2" #: src/keycode.cpp msgid "Numpad 3" msgstr "數字鍵 3" #: src/keycode.cpp msgid "Numpad 4" msgstr "數字鍵 4" #: src/keycode.cpp msgid "Numpad 5" msgstr "數字鍵 5" #: src/keycode.cpp msgid "Numpad 6" msgstr "數字鍵 6" #: src/keycode.cpp msgid "Numpad 7" msgstr "數字鍵 7" #: src/keycode.cpp msgid "Numpad 8" msgstr "數字鍵 8" #: src/keycode.cpp msgid "Numpad 9" msgstr "數字鍵 9" #: src/keycode.cpp msgid "OEM Clear" msgstr "OEM 清除" #: src/keycode.cpp msgid "PA1" msgstr "PA1" #: src/keycode.cpp msgid "Pause" msgstr "暫停" #: src/keycode.cpp msgid "Period" msgstr "句號" #: src/keycode.cpp msgid "Plus" msgstr "加號" #: src/keycode.cpp msgid "Print" msgstr "列印" #: src/keycode.cpp msgid "Prior" msgstr "上一個" #: src/keycode.cpp msgid "Return" msgstr "Return" #: src/keycode.cpp msgid "Right Button" msgstr "右鍵" #: src/keycode.cpp msgid "Right Control" msgstr "右邊 Control" #: src/keycode.cpp msgid "Right Menu" msgstr "右邊選單鍵" #: src/keycode.cpp msgid "Right Shift" msgstr "右邊 Shift" #: src/keycode.cpp msgid "Right Windows" msgstr "右方視窗" #: src/keycode.cpp msgid "Scroll Lock" msgstr "Scroll Lock" #: src/keycode.cpp msgid "Select" msgstr "選擇" #: src/keycode.cpp msgid "Shift" msgstr "Shift" #: src/keycode.cpp msgid "Sleep" msgstr "睡眠" #: src/keycode.cpp msgid "Snapshot" msgstr "螢幕截圖" #: src/keycode.cpp msgid "Space" msgstr "Space" #: src/keycode.cpp msgid "Tab" msgstr "Tab" #: src/keycode.cpp msgid "Up" msgstr "上" #: src/keycode.cpp msgid "X Button 1" msgstr "X 按鈕 1" #: src/keycode.cpp msgid "X Button 2" msgstr "X 按鈕 2" #: src/keycode.cpp msgid "Zoom" msgstr "縮放" #: src/settings_translation_file.cpp msgid "" "0 = parallax occlusion with slope information (faster).\n" "1 = relief mapping (slower, more accurate)." msgstr "" #: src/settings_translation_file.cpp #, fuzzy msgid "3D clouds" msgstr "3D 雲朵" #: src/settings_translation_file.cpp msgid "3D mode" msgstr "" #: src/settings_translation_file.cpp msgid "" "3D support.\n" "Currently supported:\n" "- none: no 3d output.\n" "- anaglyph: cyan/magenta color 3d.\n" "- interlaced: odd/even line based polarisation screen support.\n" "- topbottom: split screen top/bottom.\n" "- sidebyside: split screen side by side." msgstr "" #: src/settings_translation_file.cpp msgid "" "A chosen map seed for a new map, leave empty for random.\n" "Will be overridden when creating a new world in the main menu." msgstr "" #: src/settings_translation_file.cpp msgid "A message to be displayed to all clients when the server crashes." msgstr "" #: src/settings_translation_file.cpp msgid "A message to be displayed to all clients whe/* Minetest Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "guiChatConsole.h" #include "chat.h" #include "client/client.h" #include "debug.h" #include "gettime.h" #include "client/keycode.h" #include "settings.h" #include "porting.h" #include "client/tile.h" #include "client/fontengine.h" #include "log.h" #include "gettext.h" #include <string> #if USE_FREETYPE #include "irrlicht_changes/CGUITTFont.h" #endif inline u32 clamp_u8(s32 value) { return (u32) MYMIN(MYMAX(value, 0), 255); } GUIChatConsole::GUIChatConsole( gui::IGUIEnvironment* env, gui::IGUIElement* parent, s32 id, ChatBackend* backend, Client* client, IMenuManager* menumgr ): IGUIElement(gui::EGUIET_ELEMENT, env, parent, id, core::rect<s32>(0,0,100,100)), m_chat_backend(backend), m_client(client), m_menumgr(menumgr), m_animate_time_old(porting::getTimeMs()) { // load background settings s32 console_alpha = g_settings->getS32("console_alpha"); m_background_color.setAlpha(clamp_u8(console_alpha)); // load the background texture depending on settings ITextureSource *tsrc = client->getTextureSource(); if (tsrc->isKnownSourceImage("background_chat.jpg")) { m_background = tsrc->getTexture("background_chat.jpg"); m_background_color.setRed(255); m_background_color.setGreen(255); m_background_color.setBlue(255); } else { v3f console_color = g_settings->getV3F("console_color"); m_background_color.setRed(clamp_u8(myround(console_color.X))); m_background_color.setGreen(clamp_u8(myround(console_color.Y))); m_background_color.setBlue(clamp_u8(myround(console_color.Z))); } m_font = g_fontengine->getFont(FONT_SIZE_UNSPECIFIED, FM_Mono); if (!m_font) { errorstream << "GUIChatConsole: Unable to load mono font" << std::endl; } else { core::dimension2d<u32> dim = m_font->getDimension(L"M"); m_fontsize = v2u32(dim.Width, dim.Height); m_font->grab(); } m_fontsize.X = MYMAX(m_fontsize.X, 1); m_fontsize.Y = MYMAX(m_fontsize.Y, 1); // set default cursor options setCursor(true, true, 2.0, 0.1); } GUIChatConsole::~GUIChatConsole() { if (m_font) m_font->drop(); } void GUIChatConsole::openConsole(f32 scale) { assert(scale > 0.0f && scale <= 1.0f); m_open = true; m_desired_height_fraction = scale; m_desired_height = scale * m_screensize.Y; reformatConsole(); m_animate_time_old = porting::getTimeMs(); IGUIElement::setVisible(true); Environment->setFocus(this); m_menumgr->createdMenu(this); } bool GUIChatConsole::isOpen() const { return m_open; } bool GUIChatConsole::isOpenInhibited() const { return m_open_inhibited > 0; } void GUIChatConsole::closeConsole() { m_open = false; Environment->removeFocus(this); m_menumgr->deletingMenu(this); } void GUIChatConsole::closeConsoleAtOnce() { closeConsole(); m_height = 0; recalculateConsolePosition(); } f32 GUIChatConsole::getDesiredHeight() const { return m_desired_height_fraction; } void GUIChatConsole::replaceAndAddToHistory(const std::wstring &line) { ChatPrompt& prompt = m_chat_backend->getPrompt(); prompt.addToHistory(prompt.getLine()); prompt.replace(line); } void GUIChatConsole::setCursor( bool visible, bool blinking, f32 blink_speed, f32 relative_height) { if (visible) { if (blinking) { // leave m_cursor_blink unchanged m_cursor_blink_speed = blink_speed; } else { m_cursor_blink = 0x8000; // on m_cursor_blink_speed = 0.0; } } else { m_cursor_blink = 0; // off m_cursor_blink_speed = 0.0; } m_cursor_height = relative_height; } void GUIChatConsole::draw() { if(!IsVisible) return; video::IVideoDriver* driver = Environment->getVideoDriver(); // Check screen size v2u32 screensize = driver->getScreenSize(); if (screensize != m_screensize) { // screen size has changed // scale current console height to new window size if (m_screensize.Y != 0) m_height = m_height * screensize.Y / m_screensize.Y; m_screensize = screensize; m_desired_height = m_desired_height_fraction * m_screensize.Y; reformatConsole(); } // Animation u64 now = porting::getTimeMs(); animate(now - m_animate_time_old); m_animate_time_old = now; // Draw console elements if visible if (m_height > 0) { drawBackground(); drawText(); drawPrompt(); } gui::IGUIElement::draw(); } void GUIChatConsole::reformatConsole() { s32 cols = m_screensize.X / m_fontsize.X - 2; // make room for a margin (looks better) s32 rows = m_desired_height / m_fontsize.Y - 1; // make room for the input prompt if (cols <= 0 || rows <= 0) cols = rows = 0; recalculateConsolePosition(); m_chat_backend->reformat(cols, rows); } void GUIChatConsole::recalculateConsolePosition() { core::rect<s32> rect(0, 0, m_screensize.X, m_height); DesiredRect = rect; recalculateAbsolutePosition(false); } void GUIChatConsole::animate(u32 msec) { // animate the console height s32 goal = m_open ? m_desired_height : 0; // Set invisible if close animation finished (reset by openConsole) // This function (animate()) is never called once its visibility becomes false so do not // actually set visible to false before the inhibited period is over if (!m_open && m_height == 0 && m_open_inhibited == 0) IGUIElement::setVisible(false); if (m_height != goal) { s32 max_change = msec * m_screensize.Y * (m_height_speed / 1000.0); if (max_change == 0) max_change = 1; if (m_height < goal) { // increase height if (m_height + max_change < goal) m_height += max_change; else m_height = goal; } else { // decrease height if (m_height > goal + max_change) m_height -= max_change; else m_height = goal; } recalculateConsolePosition(); } // blink the cursor if (m_cursor_blink_speed != 0.0) { u32 blink_increase = 0x10000 * msec * (m_cursor_blink_speed / 1000.0); if (blink_increase == 0) blink_increase = 1; m_cursor_blink = ((m_cursor_blink + blink_increase) & 0xffff); } // decrease open inhibit counter if (m_open_inhibited > msec) m_open_inhibited -= msec; else m_open_inhibited = 0; } void GUIChatConsole::drawBackground() { video::IVideoDriver* driver = Environment->getVideoDriver(); if (m_background != NULL) { core::rect<s32> sourcerect(0, -m_height, m_screensize.X, 0); driver->draw2DImage( m_background, v2s32(0, 0), sourcerect, &AbsoluteClippingRect, m_background_color, false); } else { driver->draw2DRectangle( m_background_color, core::rect<s32>(0, 0, m_screensize.X, m_height), &AbsoluteClippingRect); } } void GUIChatConsole::drawText() { if (m_font == NULL) return; ChatBuffer& buf = m_chat_backend->getConsoleBuffer(); for (u32 row = 0; row < buf.getRows(); ++row) { const ChatFormattedLine& line = buf.getFormattedLine(row); if (line.fragments.empty()) continue; s32 line_height = m_fontsize.Y; s32 y = row * line_height + m_height - m_desired_height; if (y + line_height < 0) continue; for (const ChatFormattedFragment &fragment : line.fragments) { s32 x = (fragment.column + 1) * m_fontsize.X; core::rect<s32> destrect( x, y, x + m_fontsize.X * fragment.text.size(), y + m_fontsize.Y); #if USE_FREETYPE if (m_font->getType() == irr::gui::EGFT_CUSTOM) { // Draw colored text if FreeType is enabled irr::gui::CGUITTFont *tmp = dynamic_cast<irr::gui::CGUITTFont *>(m_font); tmp->draw( fragment.text, destrect, video::SColor(255, 255, 255, 255), false, false, &AbsoluteClippingRect); } else #endif { // Otherwise use standard text m_font->draw( fragment.text.c_str(), destrect, video::SColor(255, 255, 255, 255), false, false, &AbsoluteClippingRect); } } } } void GUIChatConsole::drawPrompt() { if (!m_font) return; u32 row = m_chat_backend->getConsoleBuffer().getRows(); s32 line_height = m_fontsize.Y; s32 y = row * line_height + m_height - m_desired_height; ChatPrompt& prompt = m_chat_backend->getPrompt(); std::wstring prompt_text = prompt.getVisiblePortion(); // FIXME Draw string at once, not character by character // That will only work with the cursor once we have a monospace font for (u32 i = 0; i < prompt_text.size(); ++i) { wchar_t ws[2] = {prompt_text[i], 0}; s32 x = (1 + i) * m_fontsize.X; core::rect<s32> destrect( x, y, x + m_fontsize.X, y + m_fontsize.Y); m_font->draw( ws, destrect, video::SColor(255, 255, 255, 255), false, false, &AbsoluteClippingRect); } // Draw the cursor during on periods if ((m_cursor_blink & 0x8000) != 0) { s32 cursor_pos = prompt.getVisibleCursorPosition(); if (cursor_pos >= 0) { s32 cursor_len = prompt.getCursorLength(); video::IVideoDriver* driver = Environment->getVideoDriver(); s32 x = (1 + cursor_pos) * m_fontsize.X; core::rect<s32> destrect( x, y + m_fontsize.Y * (1.0 - m_cursor_height), x + m_fontsize.X * MYMAX(cursor_len, 1), y + m_fontsize.Y * (cursor_len ? m_cursor_height+1 : 1) ); video::SColor cursor_color(255,255,255,255); driver->draw2DRectangle( cursor_color, destrect, &AbsoluteClippingRect); } } } bool GUIChatConsole::OnEvent(const SEvent& event) { ChatPrompt &prompt = m_chat_backend->getPrompt(); if(event.EventType == EET_KEY_INPUT_EVENT && event.KeyInput.PressedDown) { // Key input if (KeyPress(event.KeyInput) == getKeySetting("keymap_console")) { closeConsole(); // inhibit open so the_game doesn't reopen immediately m_open_inhibited = 50; m_close_on_enter = false; return true; } if (event.KeyInput.Key == KEY_ESCAPE) { closeConsoleAtOnce(); m_close_on_enter = false; // inhibit open so the_game doesn't reopen immediately m_open_inhibited = 1; // so the ESCAPE button doesn't open the "pause menu" return true; } else if(event.KeyInput.Key == KEY_PRIOR) { m_chat_backend->scrollPageUp(); return true; } else if(event.KeyInput.Key == KEY_NEXT) { m_chat_backend->scrollPageDown(); return true; } else if(event.KeyInput.Key == KEY_RETURN) { prompt.addToHistory(prompt.getLine()); std::wstring text = prompt.replace(L""); m_client->typeChatMessage(text); if (m_close_on_enter) { closeConsoleAtOnce(); m_close_on_enter = false; } return true; } else if(event.KeyInput.Key == KEY_UP) { // Up pressed // Move back in history prompt.historyPrev(); return true; } else if(event.KeyInput.Key == KEY_DOWN) { // Down pressed // Move forward in history prompt.historyNext(); return true; } else if(event.KeyInput.Key == KEY_LEFT || event.KeyInput.Key == KEY_RIGHT) { // Left/right pressed // Move/select character/word to the left depending on control and shift keys ChatPrompt::CursorOp op = event.KeyInput.Shift ? ChatPrompt::CURSOROP_SELECT : ChatPrompt::CURSOROP_MOVE; ChatPrompt::CursorOpDir dir = event.KeyInput.Key == KEY_LEFT ? ChatPrompt::CURSOROP_DIR_LEFT : ChatPrompt::CURSOROP_DIR_RIGHT; ChatPrompt::CursorOpScope scope = event.KeyInput.Control ? ChatPrompt::CURSOROP_SCOPE_WORD : ChatPrompt::CURSOROP_SCOPE_CHARACTER; prompt.cursorOperation(op, dir, scope); return true; } else if(event.KeyInput.Key == KEY_HOME) { // Home pressed // move to beginning of line prompt.cursorOperation( ChatPrompt::CURSOROP_MOVE, ChatPrompt::CURSOROP_DIR_LEFT, ChatPrompt::CURSOROP_SCOPE_LINE); return true; } else if(event.KeyInput.Key == KEY_END) { // End pressed // move to end of line prompt.cursorOperation( ChatPrompt::CURSOROP_MOVE, ChatPrompt::CURSOROP_DIR_RIGHT, ChatPrompt::CURSOROP_SCOPE_LINE); return true; } else if(event.KeyInput.Key == KEY_BACK) { // Backspace or Ctrl-Backspace pressed // delete character / word to the left ChatPrompt::CursorOpScope scope = event.KeyInput.Control ? ChatPrompt::CURSOROP_SCOPE_WORD : ChatPrompt::CURSOROP_SCOPE_CHARACTER; prompt.cursorOperation( ChatPrompt::CURSOROP_DELETE, ChatPrompt::CURSOROP_DIR_LEFT, scope); return true; } else if(event.KeyInput.Key == KEY_DELETE) { // Delete or Ctrl-Delete pressed // delete character / word to the right ChatPrompt::CursorOpScope scope = event.KeyInput.Control ? ChatPrompt::CURSOROP_SCOPE_WORD : ChatPrompt::CURSOROP_SCOPE_CHA