Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalisationUpdate #265

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ RUN crontab /tmp/crontab && rm /tmp/crontab
RUN sudo -u www-data mkdir -p /srv/femiwiki.com/sitemap
COPY cron/generate-sitemap /usr/local/bin/generate-sitemap

# Install 'localisation-update' script
COPY cron/localisation-update /usr/local/bin/localisation-update

# Store femiwiki resources
COPY --chown=www-data:www-data resources /srv/femiwiki.com/
Expand Down
3 changes: 3 additions & 0 deletions configs/LocalSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,9 @@
# PageImages
wfLoadExtension( 'PageImages' );

# LocalisationUpdate
wfLoadExtension( 'LocalisationUpdate' );

# FacetedCategory
wfLoadExtension( 'FacetedCategory' );

Expand Down
1 change: 1 addition & 0 deletions cron/crontab
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
0 1,5,9,13,17,21 * * * /usr/local/bin/generate-sitemap
0 5 * * * /usr/local/bin/localisation-update
13 changes: 13 additions & 0 deletions cron/localisation-update
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# 주기적으로 실행해야하는 스크립트. 미디어위키의 시스템 메시지를 항상 최신으로
# 유지시켜 준다.
#
# Reference:
# https://www.mediawiki.org/wiki/Extension:LocalisationUpdate

set -euo pipefail; IFS=$'\n\t'

cd /srv/femiwiki.com/extensions/LocalisationUpdate

sudo -u www-data php update.php --quiet
1 change: 1 addition & 0 deletions extension-installer/install_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
'BetaFeatures',
'VisualEditor',
'Widgets',
'LocalisationUpdate',
]
# 3rd party extensions and their URLs
extensions_3rdparty = {
Expand Down
2 changes: 2 additions & 0 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ fi

# Run update script
/srv/femiwiki.com/maintenance/update.php --quick
# Update localisations for MediaWiki messages in the background
php /srv/femiwiki.com/extensions/LocalisationUpdate/update.php &

# Start cron daemon
cron
Expand Down