Lhc_fl
(Linca)
2024 年 7 月 10 日午前 9:59
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
Lhc_fl
(Linca)
2024 年 7 月 22 日午前 8:45
3
这个插件就是用来批量替换翻译的啊。只不过由于缓存原因,你替换完可能还得要rebuild才能生效
CAKE_NICE
(CAKE NICE)
2024 年 7 月 22 日午前 8:47
4
我的意思是没有discourse官方提供的批量修改方法吗?
例如导出yaml文件,通过vscode来替换?
CAKE_NICE
(CAKE NICE)
2024 年 7 月 22 日午前 9:01
7
每一次更改都需要./launcher rebuild app
手动重建吗?
sudo ./launcher enter app
rm -rf tmp
我没有发现作用
Lhc_fl
(Linca)
2024 年 7 月 22 日午前 9:06
8
先试试(删了tmp后) ./launcher restart app
?
我是在开发环境下删的tmp,可能这里自动应用了
不行就rebuild。可能语言文件是预先编译好的,这个插件原理是干预了读语言yml的函数,它只会在第一次加载的时候跑一遍
「いいね!」 1
Just a reminder that including an English translation makes it much easier for others to follow along,
「いいね!」 4
tomtjes
(Thomas Reintjes)
2025 年 2 月 23 日午前 12:33
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