/* * This variable stores the labels/messages in all three languages * * 1033 - English * 1041 - Japanese * 3082 - Spanish */ var TranslationMessages = [{ "Translation": { "HEADER_MACHINE_QUALITY_INFORMATION": { "1033": "Machine Quality and Field Captured Information - What would you like to do?", "1041": "車両品質、現場情報 - 処理メニューを選択してください", "3082": "Calidad de la máquina e información capturada en el campo: ¿qué le gustaría hacer?", }, "HEADER_CREATE": { "1033": "CREATE", "1041": "作成", "3082": "CREAR", }, "TEXT_INPUT_SERIAL_NUMBER": { "1033": "Input Serial Number and Press \"Enter\" or \"Tab\" to select Model", "1041": "機番を入力し、Enter もしくはプルダウンより機種を選択してください", "3082": "Input Serial Number and Press \"Enter\" or \"Tab\" to select Model", }, "CAPTION_SERIAL_NUMBER": { "1033": "Serial Number", "1041": "機番", "3082": "Serial Number", }, "CAPTION_MODEL": { "1033": "Model", "1041": "機種-型変", "3082": "Model", }, "CAPTION_RECORD_TYPE": { "1033": "Report Type", "1041": "レポートタイプ", "3082": "Report Type", }, "CAPTION_INFORMATION_CATEGORY": { "1033": "Information Category", "1041": "分類", "3082": "Information Category", }, "FIELD_INFORMATION_CATEGORY_OPT1": { "1033": "Product Quality Issue", "1041": "製品品質問題", "3082": "Product Quality Issue", }, "FIELD_INFORMATION_CATEGORY_OPT2": { "1033": "Manual/Material Error", "1041": "資料/マニュアル不具合", "3082": "Manual/Material Error", }, // User Story 11647 add 2023/02/02 by hitachi-solutions ↓ "FIELD_INFORMATION_CATEGORY_OPT3": { "1033": "Industrial Product Quality Issue", "1041": "産機製品品質問題", "3082": "Industrial Product Quality Issue", }, // User Story 11647 add 2023/02/02 by hitachi-solutions ↑ "BUTTON_CREATE": { "1033": "CREATE", "1041": "作成", "3082": "CREATE", }, "HEADER_MANAGE": { "1033": "MANAGE", "1041": "管理", "3082": "MANAGE", }, "BUTTON_VIEW_TSIS": { "1033": "VIEW TSIs", "1041": "TSIを確認する", "3082": "VIEW TSIs", }, "BUTTON_VIEW_PENDING_REQUESTS": { "1033": "VIEW PENDING REQUESTS", "1041": "未処理案件", "3082": "VIEW PENDING REQUESTS", }, "BUTTON_VIEW_OTHER_REPORTS": { "1033": "OTHER REPORTS", "1041": "OTHER REPORTS", "3082": "OTHER REPORTS", }, "HEADER_RESEARCH": { "1033": "RESEARCH", "1041": "検索", "3082": "RESEARCH", }, "TEXT_SEARCH_HINT": { "1033": "Use a comma to separate search criteria(i.e.PC490LC - 11,engine)", "1041": "コンマで単語を区切り、検索してください。(5項目以上は検索できません)", "3082": "Use a comma to separate search criteria(i.e.PC490LC - 11,engine)", }, "TEXT_NOTE": { "1033": "Note: Search results sorting is available on click of headers", "1041": "※検索結果の項目をクリックすると、並び替え(昇順/降順)が出来ます。", "3082": "Note: Search results sorting is available on click of headers", }, "BUTTON_SEARCH": { "1033": "SEARCH", "1041": "検索", "3082": "SEARCH", }, "BUTTON_TRS": { "1033": "TSR", "1041": "TSR", "3082": "TSR", }, "BUTTON_MACHINE_QUALITY_INFORMATION": { "1033": "MACHINE QUALITY INFORMATION", "1041": "車両品質情報", "3082": "MACHINE QUALITY INFORMATION", }, "LINK_GET_HELP": { "1033": "Get Help", "1041": "Get Help", "3082": "Get Help", }, "HEADER_GLOBAL_SEARCH": { "1033": "Global Search", "1041": "グローバル検索", "3082": "Global Search", }, "FIELD_TITLE": { "1033": "Title", "1041": "件名", "3082": "Title", }, "FIELD_STATUS": { "1033": "Status", "1041": "ステータス", "3082": "Status", }, "FIELD_MODEL": { "1033": "Model", "1041": "機種-型変", "3082": "Model", }, "FIELD_SERIAL": { "1033": "Serial", "1041": "機番", "3082": "Serial", }, "FIELD_CASETYPE": { "1033": "Case Type", "1041": "案件タイプ", "3082": "case Type", }, "FIELD_DISTRIBUTOR": { "1033": "Distributor", "1041": "代理店", "3082": "Distributor", }, "FIELD_FAILURE_DATE": { "1033": "Failure Date", "1041": "不具合発生日", "3082": "Failure Date", }, "FIELD_FULL_FAILURE_DATE": { "1033": "Full Failure Date", "1041": "Full Failure Date", "3082": "Full Failure Date", }, "MESSAGE_NO_RESULTS_FOUND": { "1033": "NO RESULTS FOUND", "1041": "検索結果がありません", "3082": "NO RESULTS FOUND", }, "FIELD_REPORT_ID": { "1033": "Report ID", "1041": "レポートID", "3082": "Report ID", }, "BUTTON_PART_RETURN_REQUEST": { "1033": "PARTS RETURN REQUEST", "1041": "故障品返却依頼", "3082": "Solicitud de Devolucion de piezas/partes", }, // User Story 10474 by hitachi-solutions 2023/01/17 ↓ // "BUTTON_SERVICE_NEWS": { "1033": "SERVICE NEWS", "1041": "サービスニュース", "3082": "SERVICE NEWS", }, // User Story 10474 by hitachi-solutions 2023/01/17 ↑ // "BUTTON_REQUEST_CANCELLATION": { "1033": "Request Cancellation", "1041": "キャンセル依頼", "3082": "Solicitar Cancelacion", }, "CHANGE_REQUEST":{ "1033": "Change Request", "1041": "内容変更依頼", "3082": "Solicitar Cambio", }, "BUTTON_ACCEPT": { "1033": "Accept", "1041": "承認", "3082": "Aceptar", }, "FIELD_FAILED_PART_NAME": { "1033": "Failed Part Name", "1041": "不具合部品名", "3082": "Failed Part Name", }, "BUTTON_PICKUP_REQUESTED": { "1033": "Pick-Up Request", "1041": "集荷依頼", "3082": "Solicitud Recogida", }, "FIELD_FAILED_PART_NUMBER": { "1033": "Failed Part Number", "1041": "不具合部品品番", "3082": "Failed Part Number", }, "BUTTON_SHIPPED": { "1033": "Ship", // User Story 11635 by hitachi-solutions 2022/09/27 ↓ // //"1041": "Ship", "1041": "発送", // User Story 11635 by hitachi-solutions 2022/09/27 ↑ // "3082": "Ship", }, "PORTAL_ASSIGN": { "1033": "Portal Assign", "1041": "別担当者へ依頼", "3082": "Portal Assign", }, "BACK_TO_PRR": { "1033": "Back", "1041": "戻る", "3082": "Back", }, // User Story 11635 by hitachi-solutions 2022/09/27 ↓ // "BUTTON_SUBMIT": { "1033": "Submit", "1041": "発行", "3082": "Submit", }, "BUTTON_INFORMATION_PROVIDED": { "1033": "Information Provided", "1041": "情報提供", "3082": "Information Provided", }, "MESSAGE_KOMATSU_RECEIVED": { "1033": "Komatsu has received the case. The case is no longer editable, but comments can be added below.", "1041": "このTSIはコマツに発行済です。コメント、添付ファイルのみ追加可能です。", "3082": "Komatsu has received the case. The case is no longer editable, but comments can be added below.", }, "MESSAGE_AWAITNG_APPROVAL": { "1033": "The case has been submitted to the Distributor's Back Office and awaiting approval.", "1041": "このTSIはまだ発行されていません。代理店内の承認待ちです。", "3082": "The case has been submitted to the Distributor's Back Office and awaiting approval.", }, "MESSAGE_PENDING_REQUEST": { "1033": "The case has a pending request; please review the portal comments.", "1041": "保留中。依頼内容をコメント欄で確認し、情報追加などの対応をお願いします。", "3082": "The case has a pending request; please review the portal comments.", }, "MESSAGE_APPROVED": { "1033": "The case is approved by the Distributor's Back Office and submitted to Komatsu. The case is no longer editable but comments can be added below.", "1041": "代理店内で承認され、発行されました。コメント、添付ファイルのみ追加可能です。", "3082": "The case is approved by the Distributor's Back Office and submitted to Komatsu. The case is no longer editable but comments can be added below.", }, "MESSAGE_DISAPPROVED": { "1033": "Komatsu has disapproved of the case. Please review the comments for additional information.", "1041": "TSIが否認されました。コメントを確認下さい。", "3082": "Komatsu has disapproved of the case. Please review the comments for additional information.", }, "MESSAGE_CLOSED": { "1033": "The case has now been closed and marked as canceled. If a TSI is still needed, please proceed with a new case.", "1041": "TSIが、クローズ(キャンセル)されました。TSI発行が必要であれば、新規作成下さい。", "3082": "The case has now been closed and marked as canceled. If a TSI is still needed, please proceed with a new case.", }, "SEARCH_BOX": { "1033": "Search for TSRs, TSIs, survey content, etc…", "1041": "検索する単語を入力してください", "3082": "Search for TSRs, TSIs, survey content, etc…", } // User Story 11635 by hitachi-solutions 2022/09/27 ↑ // } }]; if (typeof (KOM) === "undefined") { KOM = {}; } if (typeof (KOM.XRM) === "undefined") { KOM.XRM = {}; } KOM.XRM.CaseTranslation = (function () { 'use strict'; return { SetTranslations: function () { var labellist = document.getElementsByClassName("change-translation"); for (var i = 0; i < labellist.length; i++) { labellist[i].innerText = KOM.XRM.CaseTranslation.GetTranslatedMessage(labellist[i].innerText); } }, GetTranslatedMessage: function (identifier) { //var currUserLcid = Xrm.Page.context.getUserLcid(); // For CRM var currUserLcid = KOM.XRM.CaseTranslation.GetLanguageId(); // For Porals var multilingualMessageArray = KOM.XRM.CaseTranslation.GetMessageCollection(identifier); var translatedMessage = null; if (multilingualMessageArray !== null && multilingualMessageArray !== undefined) translatedMessage = multilingualMessageArray[currUserLcid]; else translatedMessage = identifier; return translatedMessage; }, GetLanguageId: function () { var currUserLcid = 1033; try { var langid = document.getElementsByClassName("drop_language")[0].innerText; switch (langid) { case "English": currUserLcid = 1033; break; case "日本語": currUserLcid = 1041; break; case "español": currUserLcid = 3082; break; default: currUserLcid = 1033; break; } } catch (e) { } return currUserLcid; }, GetMessageCollection: function (identifier) { var multilingualMessageCollection = null; try { var oppErrorMessageCollection = JSON.parse(JSON.stringify(TranslationMessages)); multilingualMessageCollection = oppErrorMessageCollection[0].Translation[identifier]; } catch (e) { } return multilingualMessageCollection; } }; })(); $(document).ready(function () { KOM.XRM.CaseTranslation.SetTranslations(); });