Skip to content
Merged
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
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ RUN \
/tmp/projectsend.zip -d \
/app/www/public && \
mv /app/www/public/upload /defaults/ && \
echo "**** download default lang files ****" && \
mkdir -p /defaults/lang && \
curl -fso \
/defaults/lang/en.mo -L \
"https://raw.githubusercontent.com/projectsend/projectsend/refs/heads/develop/templates/default/lang/en.mo" && \
curl -fso \
/defaults/lang/en.po -L \
"https://raw.githubusercontent.com/projectsend/projectsend/refs/heads/develop/templates/default/lang/en.po" && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
rm -rf \
Expand Down
8 changes: 8 additions & 0 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ RUN \
/tmp/projectsend.zip -d \
/app/www/public && \
mv /app/www/public/upload /defaults/ && \
echo "**** download default lang files ****" && \
mkdir -p /defaults/lang && \
curl -fso \
/defaults/lang/en.mo -L \
"https://raw.githubusercontent.com/projectsend/projectsend/refs/heads/develop/templates/default/lang/en.mo" && \
curl -fso \
/defaults/lang/en.po -L \
"https://raw.githubusercontent.com/projectsend/projectsend/refs/heads/develop/templates/default/lang/en.po" && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
rm -rf \
Expand Down
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ init_diagram: |
"projectsend:latest" <- Base Images
# changelog
changelogs:
- {date: "16.11.25:", desc: "Add missing language files to default install."}
- {date: "14.10.25:", desc: "Rebase to 3.22."}
- {date: "06.06.25:", desc: "Add crontab handler for scheduled tasks."}
- {date: "21.12.24:", desc: "Rebase to Alpine 3.21, move php .ini file to /config/php."}
Expand Down
40 changes: 15 additions & 25 deletions root/etc/s6-overlay/s6-rc.d/init-projectsend-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,9 @@ fi

#Handle translations
mkdir -p /config/translations

shopt -s globstar dotglob

#check if there are newer translation files in the container and if so copy them to /config
if [[ -d /config/translations/lang && ! -L /app/www/public/lang ]]; then
for file in /app/www/public/lang/*; do
if [ $(date -r "$file" +%s) -ge $(date -r "/config/translations/lang/$(echo $file | awk -F '/' '{print $(NF)}')" +%s) ]; then
cp "$file" /config/translations/lang/
fi
done
fi
# symlink translations
if [[ -d /config/translations/lang && ! -L /app/www/public/lang ]]; then
rm -rf /app/www/public/lang
fi
Expand All @@ -77,6 +68,10 @@ fi
if [[ -d /config/translations/lang && ! -L /app/www/public/lang ]]; then
ln -s /config/translations/lang /app/www/public/lang
fi
if [[ ! -f /config/translations/lang/en.po ]] || [[ ! -f /config/translations/lang/en.mo ]]; then
mkdir -p /config/translations/lang
cp /defaults/lang/* /config/translations/lang/
fi

symlinks=(
/app/www/public/templates/default/lang
Expand All @@ -85,26 +80,21 @@ symlinks=(
)

for i in "${symlinks[@]}"; do
path=$(echo "$i" | awk -F '/' '{print $(NF-1)"/"$NF}')
#check if there are newer translation files in the container and if so copy them to /config
if [[ -d /config/translations/"$path" && ! -L "$i" ]]; then
for file in "$i"/*; do
if [ $(date -r "$file" +%s) -ge $(date -r "/config/translations/$(echo $i | awk -F '/' '{print $(NF-1)}')/$(echo $file | awk -F '/' '{print $(NF)}')" +%s) ]; then
cp "$file" "/config/translations/$(echo $i | awk -F '/' '{print $(NF-1)}')"
fi
done
fi
path=$(echo "${i}" | awk -F '/' '{print $(NF-1)}')
# symlink translations
if [[ -d /config/translations/"$path" && ! -L "$i" ]]; then
rm -rf "$i"
if [[ -d /config/translations/"$path" && ! -L "${i}" ]]; then
rm -rf "${i}"
fi
if [[ ! -d /config/translations/"$path" && ! -L "$i" ]]; then
mv "$i" /config/translations/"$(echo $i | awk -F '/' '{print $(NF-1)}')"
if [[ ! -d /config/translations/"$path" && ! -L "${i}" ]]; then
mv "$i" /config/translations/"$(echo "${i}" | awk -F '/' '{print $(NF-1)}')"
fi
if [[ -d /config/translations/"$path" && ! -L "$i" ]]; then
ln -s /config/translations/"$path" "$i"
if [[ -d /config/translations/"$path" && ! -L "${i}" ]]; then
ln -s /config/translations/"$path" "${i}"
fi
if [[ ! -f /config/translations/"$path"/en.po ]] || [[ ! -f /config/translations/"$path"/en.mo ]]; then
mkdir -p /config/translations/"$path"
cp /defaults/lang/* /config/translations/"$path"/
fi

done

shopt -u globstar dotglob
Expand Down