Lhc_fl
(Linca)
July 10, 2024, 9:59am
1
Features
Literally, replace all occurrences of a word with another word
For example, replace “Topic” with “Nya”:
Configuration
I believe its settings are self-explanatory
Note that translations are cached and changing them takes time. You can do this to force update:
sudo ./launcher enter app
rm -rf tmp
12 Likes
Lhc_fl
(Linca)
July 22, 2024, 8:45am
3
这个插件就是用来批量替换翻译的啊。只不过由于缓存原因,你替换完可能还得要rebuild才能生效
CAKE_NICE
(CAKE NICE)
July 22, 2024, 8:47am
4
我的意思是没有discourse官方提供的批量修改方法吗?
例如导出yaml文件,通过vscode来替换?
CAKE_NICE
(CAKE NICE)
July 22, 2024, 9:01am
7
每一次更改都需要./launcher rebuild app
手动重建吗?
sudo ./launcher enter app
rm -rf tmp
我没有发现作用
Lhc_fl
(Linca)
July 22, 2024, 9:06am
8
先试试(删了tmp后) ./launcher restart app
?
我是在开发环境下删的tmp,可能这里自动应用了
不行就rebuild。可能语言文件是预先编译好的,这个插件原理是干预了读语言yml的函数,它只会在第一次加载的时候跑一遍
1 Like
Just a reminder that including an English translation makes it much easier for others to follow along,
4 Likes
tomtjes
(Thomas Reintjes)
February 23, 2025, 12:33am
11
If using this to substitute another term for category be aware that this plugin also replaces the word in templates such as {category}
, leading to errors in the UI. To avoid this, I’m using the regex
en:(?<!\{)category(?!\})=>chapter
in the plugin settings, but perhaps the plugin should be adjusted to only target user-facing content.
2 Likes