From 0373dc253adb71957bfdae054dd8183bc3b23d86 Mon Sep 17 00:00:00 2001 From: Philipp Date: Wed, 12 May 2021 19:11:42 +0200 Subject: [PATCH 1/2] Add friendicaci/transifex image --- transifex/Dockerfile | 10 ++++++++++ transifex/check-messages.sh | 13 +++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 transifex/Dockerfile create mode 100755 transifex/check-messages.sh diff --git a/transifex/Dockerfile b/transifex/Dockerfile new file mode 100644 index 0000000..21b8b0e --- /dev/null +++ b/transifex/Dockerfile @@ -0,0 +1,10 @@ +FROM ubuntu:20.04 + +RUN apt-get update -q && \ + DEBIAN_FRONTEND=noninteractive apt-get install -q -y \ + gettext \ + git \ + && apt-get clean \ + && rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* + +COPY check-messages.sh /check-messages.sh \ No newline at end of file diff --git a/transifex/check-messages.sh b/transifex/check-messages.sh new file mode 100755 index 0000000..2891e78 --- /dev/null +++ b/transifex/check-messages.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# +# Checks the default messages.po file +# + +# Skip first 4 lines in possible diff, because they're header +# Skip all lines of the git diff starting with "@@" or comments or starting "POT-Creation-Date" +if [[ $(git diff -U0 ./view/lang/C/messages.po | grep -vE '^(@@|\-"POT-Creation-Date|\+"POT-Creation-Date|\-#|\+#)' | wc -l) -gt 4 ]]; then + echo "$(git diff ./view/lang/C/messages.po)" + exit 1 +else + echo "Nothing to update" +fi From e1199835c5407d8d4580cde73eb939bb9c146d23 Mon Sep 17 00:00:00 2001 From: Philipp Date: Thu, 13 May 2021 13:02:05 +0200 Subject: [PATCH 2/2] Add EOF --- transifex/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transifex/Dockerfile b/transifex/Dockerfile index 21b8b0e..00eacf0 100644 --- a/transifex/Dockerfile +++ b/transifex/Dockerfile @@ -7,4 +7,4 @@ RUN apt-get update -q && \ && apt-get clean \ && rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* -COPY check-messages.sh /check-messages.sh \ No newline at end of file +COPY check-messages.sh /check-messages.sh