Well, I have no time for discuting bs with js;
The admin language files are inside [nodebb]/public/language/YOURFORUMLANGUAGE/admin/
I have made a python3 script to make an organized admin/
directory from the files downloaded from transifex. (You should download all files one by one, should be 30 or 40, takes 7~10 minutes)
- Make a new directory
- Dowload all translated .json files to that directory
- They have names like
for_use_nodebb_admin-advanced-events_pt_BR.json
. - Save this script in a file called
freak.python3
in the directory you created.
#!/usr/bin/env python3
import os
import glob
# use os.system("") to do it lil boy
import subprocess
# Files downloaded from transifex has this string in filename.
# This should be removed from them; change with yours.
language_str = "_pt_BR"
json_files = glob.glob('*.json', recursive=False)
dirs_created = list()
for file in json_files:
ripped = file.split('-', 2) # 2 here is a hack to avoid splitting ip-blacklist.json and web-crawler.json
json_filename = ripped[-1].replace(language_str,'')
print(ripped)
if len(ripped) == 3:
directory = "admin/{0}/".format(ripped[1])
elif len(ripped) == 2:
directory = "admin/"
else:
directory = "ERROR/" # if this directory appears something went wrong
if not directory in dirs_created:
dirs_created.append(directory)
print(directory)
os.system("mkdir -p {0}".format(directory))
print(json_filename)
os.system("cp {0} {1}{2}".format(file, directory, json_filename))
- CHANGE THE LINE
language_str = "_pt_BR"
WITH YOUR LANGUAGE KEEPING THE _ before.. - Make it executable:
chmod +x freak.python3
- Execute it:
./freak.python3
- This will create an
admin/
directory inside the directory, tar it and send to server:tar zcvf admin.tgz admin/
scp admin.tgz SSHUSER@SSHSERVER:
or whetever you use.