User raydrrrr is trying to remove Google Translate from their Discourse instance due to Chinese GFW blocking Google, causing delays for Chinese visitors. Despite removing the discourse-translate plugin and disabling the translate function, the Google Translate code remains, causing issues.
Falco suggested removing the plugin and rebuilding, but raydrrrr found that the Google Translate code was still present in the Discourse code. After further investigation, Falco discovered that the issue was caused by a theme customization, not a plugin or browser extension. raydrrrr confirmed this and was able to disable the theme using Safe Mode.
Falco explained that themes live in the database and should be removed through the Admin UI, not by modifying the Docker container. In the end, Falco concluded that the issue was caused by a deliberate change made to the site, which was later forgotten.
I know the new added Google Translate plugin work perfect in the world. But this is not the case in China. I like Discourse very much. But I have to working on how to remove all Google stuff from Discourse.
Poorly I do not have much experience in Docker + Ruby + Discourse.
I had a hard time to change the view in app folder in the container.
I have one simple question about the host docker app.yml file.
Will that hook exec command for plugin in container/app.yml execute after pull discourse from GitHub?
The problem google added some kind of code to my docker. I disable the translate function first, then I removed discourse-translate it from the container and host and the app.yml. But the google translate works like a ghost, hiding everywhere in the discourse code. Chinese GFW block all google so that we can see a clear delay when requiring google JS file.
I found these two file in the original source that loads the google translate.
#sudo sed -i.bak ‘/server:before-body-close/d’ /var/www/discourse/app/views/layouts/application.html.erb && #sudo sed -i.bak ‘/server:before-body-close/d’ /var/www/discourse/app/views/layouts/no_ember.html.erb &&\
It is fine they want craw data from our site. But the visitor from China are suffering a huge delay because this one JS file. After I added these two line of code to app.yml, it still loaded google translate.
1984 ./launcher rebuild app
1985 ./launcher enter app
1986 ./launcher rebuild app
1987 ./launcher enter app
1988 ./launcher rebuild app
1989 ./launcher enter app
1990 vim image/base/Dockerfile
1991 ls
1992 cd containers/
1993 ls
1994 vim app.yml
1995 cd ..
1996 ls
1997 ./launcher rebuild app
1998 ./launcher enter app