首页 > 其他分享 >ART 轻量级报表工具汉化

ART 轻量级报表工具汉化

时间:2023-01-10 12:08:33浏览次数:83  
标签:rw ART 21 -- ArtMessages 汉化 root properties 轻量级



打开语言文件目录:cd /usr/local/java/tomcat/webapps/art/WEB-INF/i18n

[root@centos]# cd /usr/local/java/tomcat/webapps/art/WEB-INF/i18n
[root@centos]# i18n]# ll
总计 200
-rw-r--r-- 1 root root 5249 12-08 15:21 ArtMessages_es.properties
-rw-r--r-- 1 root root 5269 12-08 15:21 ArtMessages_fr.properties
-rw-r--r-- 1 root root 3898 12-08 15:21 ArtMessages_hu.properties
-rw-r--r-- 1 root root 3322 12-08 15:21 ArtMessages_it.properties
-rw-r--r-- 1 root root 55202 12-08 15:21 ArtMessages_lt.properties
-rw-r--r-- 1 root root 47072 12-08 15:21 ArtMessages.properties
-rw-r--r-- 1 root root 5258 12-08 15:21 ArtMessages_pt_BR.properties
-rw-r--r-- 1 root root 47518 12-08 15:21 ArtMessages_sw.properties
-rw-r--r-- 1 root root 2246 12-08 15:21 ArtMessages_zh_CN.properties
-rw-r--r-- 1 root root 2253 12-08 15:21 ArtMessages_zh_TW.properties
-rw-r--r-- 1 root root 512 12-08 15:21 languages.properties
[root@centos]#


可以看到这些文件都是用于支持不同语言的配置脚本。其中语言的选用在文件

 languages.properties 设置

[root@centos]# vi languages.properties

# list of languages to be displayed in the language drop down box
# format is <language code> = <language name>
# see https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
# and https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_and_their_capitals_in_native_languages

en = English
#sw = Kiswahili
#fr = Fran\u00e7ais
#it = Italiano
#de = Deutsch
#lt = Lietuvi\u0173
#es = Espa\u00f1ol
#hu = Magyar
#pt_BR = Portugu\u00eas (Brasil)
zh_CN = \u7b80\u4f53\u4e2d\u6587
#zh_TW = \u7e41\u9ad4\u4e2d\u6587


将 zh_CN = \u7b80\u4f53\u4e2d\u6587 前面的“#” 去掉 ,保留英文和中文,其他注释。 后面的字符为 unicode 编码, “\u7b80\u4f53\u4e2d\u6587” 中文为 “简体中文” 。


修改完成后重启 tomcat 服务:

service tomcat stop
service tomcat start


退出 art 登录或重新登陆,可看到有选择 “

简体中文” 语言

ART 轻量级报表工具汉化_tomcat

ART 轻量级报表工具汉化_java_02

但是选择中文登录进来,还是有很多英文的!这时因为,汉化文件尚未汉化所有的英文。

在 目录 /usr/local/java/tomcat/webapps/art/WEB-INF/i18n 中,看到文件 ArtMessages_zh_CN.properties  ,这就是汉化文件。


怎么汉化呢?找一个文件测试一下。

ART 轻量级报表工具汉化_2d_03

该头部导航对应的 jsp 文件为:

vi /usr/local/java/tomcat/webapps/art/WEB-INF/jsp/header.jsp

ART 轻量级报表工具汉化_java_04




找到这样的信息: header.link.reports 、header.link.jobs  ,这两个名词分别对应导航的 “Reports ”  和 “Jobs”  。编辑 ArtMessages_zh_CN.properties 添加以下汉化信息。

vi /usr/local/java/tomcat/webapps/art/WEB-INF/i18n/ArtMessages_zh_CN.properties

ART 轻量级报表工具汉化_2d_05



红框为新增加的汉化,将中文名称转unicode编码就行(中文转unicode工具很多)

保存后重启 tomcat 服务,重新登陆 art 。头部导航已汉化:

ART 轻量级报表工具汉化_2d_06


不过要是汉化所有,得花很长时间啊。所以,求共享,求开源  ^ ^……


后续:花了些时间,终于汉化完了,已上传到 github


标签:rw,ART,21,--,ArtMessages,汉化,root,properties,轻量级
From: https://blog.51cto.com/hzc2012/6000156

相关文章

  • kali汉化
    CTRL+ALT+T打开命令终端输入“dpkg-reconfigurelocales”小键盘上下键选择语言空格确定TAB选择OK最后输入reboot重启kali,开机汉化成功......
  • Arthas诊断工具
    阿里巴巴新出了个java诊断工具,看起来很好用。ArthasArthas是Alibaba开源的Java诊断工具,深受开发者喜爱。当你遇到以下类似问题而束手无策时,Arthas可以帮助你解决:这个类从哪......
  • K8S 三种探针 ReadinessProbe、LivenessProbe和StartupProbe 之探索
    事件背景因为k8s中采用大量的异步机制、以及多种对象关系设计上的解耦,当应用实例数增加/删除、或者应用版本发生变化触发滚动升级时,系统并不能保证应用相关的service......
  • Error resolving template [currentUserCartItems], template might not exist or mi
    一、问题背景远程调用其他微服务的请求二、报错截图如下三、我的项目配置如下四、分析问题漏了注解@ResponseBody因为远程返回的都是json,返回String字符串将会被当......
  • win32 EnumWindows in dart
    使用和C里面完全一样latefinalint_workerWHexHandle;int_enumWindowsProc(inthWnd,intlParam){///print(hWnd.toRadixString(16));intpHWnd=FindWindo......
  • CF1768E Partial Sorting - 组合数学 -
    题目链接:https://codeforces.com/contest/1768/problem/E题解:记P1为将\(1..2\timesn\)排序,P2为将\(n+1..3\timesn\)排序首先观察到答案一定不会超过3(P1P2......
  • The Art of Computer Programming
    仅供看一乐。\(L_n\)isthenumberofpermutationsof\(\{1,1,\ldots,n,n\}\)suchthatthereareexact\(i\)numbersbetweentwo\(i\)s.Reverseregardasthe......
  • 攀枝花市地铁线路图 EChart
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="utf-8"><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content......
  • dart use DLL file
    Weneedtodotwostepsdefinetwotypesonefordartitselfandoneforffi,withffiasthebridgetypedefChangeBackgroundFFI=ffi.VoidFunction(ffi.Poin......
  • dotnet 6 创建进程 Process.Start 时设置 UseShellExecute 在 Windows 下对性能的影响
    本文将告诉大家,在dotnet6或dotnet7版本里,启动新的进程时,在StartInfo设置UseShellExecute为true和false时,对性能的影响在dotnet6或dotnet7版本里,其他......