Spaces:
Sleeping
Sleeping
| /** | |
| * Copyright (c) 2017~2020, OBCon Inc. | |
| * All rights reserved. | |
| */ | |
| /** | |
| * @file | |
| * @copyright 2017~2020, OBCon Inc. | |
| * @author gye hyun james kim [pnuskgh@gmail.com] | |
| */ | |
| let Lang = utils.getClass('include', 'lang.js'); | |
| class MarkdownsLang extends Lang { | |
| constructor() { | |
| super(); | |
| this._model = modules.markdowns.model; | |
| this.langs = this.setLang(); | |
| } | |
| setLang() { | |
| return { | |
| ko_KR: { //--- 언어 | |
| name: this._model._title, //--- 모듈 이름 | |
| fields: { | |
| }, | |
| msgs: { //--- Messages | |
| } | |
| } | |
| }; | |
| } | |
| //--- Markdown 파일에서 {{~}}로 표시된 부분을 교체 한다. | |
| replaceContent(content, service=null) { | |
| service = service || config.service.name; | |
| switch (service) { | |
| case 'service_scada_caprotec': | |
| case 'service_scada_ursc': | |
| case 'service_cms_caprotec': //--- 삭제 예정 | |
| content = content.replace(/{{book.device}}/g, '장치'); | |
| content = content.replace(/{{book.branch}}/g, '분류'); | |
| break; | |
| case 'service_cms_jopenbusiness': | |
| case 'service_cms_obcon': | |
| case 'service_cms_bluestone': | |
| case 'service_iot_obcon': | |
| case 'service_scada_obcon': | |
| case 'service_scada_techpalm': | |
| default: | |
| content = content.replace(/{{book.device}}/g, '장비'); | |
| content = content.replace(/{{book.branch}}/g, '지사'); | |
| break; | |
| } | |
| return content; | |
| } | |
| } | |
| module.exports = MarkdownsLang; | |