mirror of
https://github.com/Motion-Project/motion.git
synced 2025-12-23 23:18:21 -05:00
Remove separate translate module
This commit is contained in:
@@ -12,7 +12,6 @@ src/netcam.c
|
||||
src/picture.c
|
||||
src/rotate.c
|
||||
src/track.c
|
||||
src/translate.c
|
||||
src/video_common.c
|
||||
src/video_loopback.c
|
||||
src/video_v4l2.c
|
||||
|
||||
10
po/da.po
10
po/da.po
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 4.x\n"
|
||||
"Report-Msgid-Bugs-To: https://motion-project.github.io\n"
|
||||
"POT-Creation-Date: 2019-09-25 23:02-0600\n"
|
||||
"POT-Creation-Date: 2019-09-27 21:06-0600\n"
|
||||
"PO-Revision-Date: 2018-10-13 11:59-0600\n"
|
||||
"Last-Translator: MrDave <MotionMrDave@gmail.com>\n"
|
||||
"Language-Team: MrDave <MotionMrDave@gmail.com>\n"
|
||||
@@ -1263,6 +1263,10 @@ msgstr ""
|
||||
msgid "Unable to return a buffer to the camera video port"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
#, c-format
|
||||
msgid "Resizing pre_capture buffer to %d items"
|
||||
@@ -2577,10 +2581,6 @@ msgstr ""
|
||||
msgid "After_REL_Y_Angel : x= %d , Y= %d"
|
||||
msgstr ""
|
||||
|
||||
#: src/translate.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/video_common.c
|
||||
msgid "Corrupt image ... continue"
|
||||
msgstr ""
|
||||
|
||||
10
po/de.po
10
po/de.po
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 4.x\n"
|
||||
"Report-Msgid-Bugs-To: https://motion-project.github.io\n"
|
||||
"POT-Creation-Date: 2019-09-25 23:02-0600\n"
|
||||
"POT-Creation-Date: 2019-09-27 21:06-0600\n"
|
||||
"PO-Revision-Date: 2018-10-13 11:59-0600\n"
|
||||
"Last-Translator: MrDave <MotionMrDave@gmail.com>\n"
|
||||
"Language-Team: MrDave <MotionMrDave@gmail.com>\n"
|
||||
@@ -1264,6 +1264,10 @@ msgstr ""
|
||||
msgid "Unable to return a buffer to the camera video port"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
msgid "Language: English"
|
||||
msgstr "Sprache: Deutsch"
|
||||
|
||||
#: src/motion.c
|
||||
#, c-format
|
||||
msgid "Resizing pre_capture buffer to %d items"
|
||||
@@ -2578,10 +2582,6 @@ msgstr ""
|
||||
msgid "After_REL_Y_Angel : x= %d , Y= %d"
|
||||
msgstr ""
|
||||
|
||||
#: src/translate.c
|
||||
msgid "Language: English"
|
||||
msgstr "Sprache: Deutsch"
|
||||
|
||||
#: src/video_common.c
|
||||
msgid "Corrupt image ... continue"
|
||||
msgstr ""
|
||||
|
||||
10
po/es.po
10
po/es.po
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 4.x\n"
|
||||
"Report-Msgid-Bugs-To: https://motion-project.github.io\n"
|
||||
"POT-Creation-Date: 2019-09-25 23:02-0600\n"
|
||||
"POT-Creation-Date: 2019-09-27 21:06-0600\n"
|
||||
"PO-Revision-Date: 2018-10-13 12:00-0600\n"
|
||||
"Last-Translator: MrDave <MotionMrDave@gmail.com>\n"
|
||||
"Language-Team: MrDave <MotionMrDave@gmail.com>\n"
|
||||
@@ -1264,6 +1264,10 @@ msgstr ""
|
||||
msgid "Unable to return a buffer to the camera video port"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
msgid "Language: English"
|
||||
msgstr "Idioma: Español"
|
||||
|
||||
#: src/motion.c
|
||||
#, c-format
|
||||
msgid "Resizing pre_capture buffer to %d items"
|
||||
@@ -2578,10 +2582,6 @@ msgstr ""
|
||||
msgid "After_REL_Y_Angel : x= %d , Y= %d"
|
||||
msgstr ""
|
||||
|
||||
#: src/translate.c
|
||||
msgid "Language: English"
|
||||
msgstr "Idioma: Español"
|
||||
|
||||
#: src/video_common.c
|
||||
msgid "Corrupt image ... continue"
|
||||
msgstr ""
|
||||
|
||||
10
po/fi.po
10
po/fi.po
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 4.x\n"
|
||||
"Report-Msgid-Bugs-To: https://motion-project.github.io\n"
|
||||
"POT-Creation-Date: 2019-09-25 23:02-0600\n"
|
||||
"POT-Creation-Date: 2019-09-27 21:06-0600\n"
|
||||
"PO-Revision-Date: 2018-10-13 12:00-0600\n"
|
||||
"Last-Translator: MrDave <MotionMrDave@gmail.com>\n"
|
||||
"Language-Team: MrDave <MotionMrDave@gmail.com>\n"
|
||||
@@ -1263,6 +1263,10 @@ msgstr ""
|
||||
msgid "Unable to return a buffer to the camera video port"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
#, c-format
|
||||
msgid "Resizing pre_capture buffer to %d items"
|
||||
@@ -2577,10 +2581,6 @@ msgstr ""
|
||||
msgid "After_REL_Y_Angel : x= %d , Y= %d"
|
||||
msgstr ""
|
||||
|
||||
#: src/translate.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/video_common.c
|
||||
msgid "Corrupt image ... continue"
|
||||
msgstr ""
|
||||
|
||||
10
po/fr.po
10
po/fr.po
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 4.x\n"
|
||||
"Report-Msgid-Bugs-To: https://motion-project.github.io\n"
|
||||
"POT-Creation-Date: 2019-09-25 23:02-0600\n"
|
||||
"POT-Creation-Date: 2019-09-27 21:06-0600\n"
|
||||
"PO-Revision-Date: 2018-10-13 12:01-0600\n"
|
||||
"Last-Translator: MrDave <MotionMrDave@gmail.com>\n"
|
||||
"Language-Team: MrDave <MotionMrDave@gmail.com>\n"
|
||||
@@ -1270,6 +1270,10 @@ msgstr ""
|
||||
msgid "Unable to return a buffer to the camera video port"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
#, c-format
|
||||
msgid "Resizing pre_capture buffer to %d items"
|
||||
@@ -2584,10 +2588,6 @@ msgstr ""
|
||||
msgid "After_REL_Y_Angel : x= %d , Y= %d"
|
||||
msgstr ""
|
||||
|
||||
#: src/translate.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/video_common.c
|
||||
msgid "Corrupt image ... continue"
|
||||
msgstr ""
|
||||
|
||||
10
po/it.po
10
po/it.po
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 4.x\n"
|
||||
"Report-Msgid-Bugs-To: https://motion-project.github.io\n"
|
||||
"POT-Creation-Date: 2019-09-25 23:02-0600\n"
|
||||
"POT-Creation-Date: 2019-09-27 21:06-0600\n"
|
||||
"PO-Revision-Date: 2018-10-13 12:02-0600\n"
|
||||
"Last-Translator: MrDave <MotionMrDave@gmail.com>\n"
|
||||
"Language-Team: MrDave <MotionMrDave@gmail.com>\n"
|
||||
@@ -1263,6 +1263,10 @@ msgstr ""
|
||||
msgid "Unable to return a buffer to the camera video port"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
#, c-format
|
||||
msgid "Resizing pre_capture buffer to %d items"
|
||||
@@ -2577,10 +2581,6 @@ msgstr ""
|
||||
msgid "After_REL_Y_Angel : x= %d , Y= %d"
|
||||
msgstr ""
|
||||
|
||||
#: src/translate.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/video_common.c
|
||||
msgid "Corrupt image ... continue"
|
||||
msgstr ""
|
||||
|
||||
10
po/ja.po
10
po/ja.po
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 4.x\n"
|
||||
"Report-Msgid-Bugs-To: https://motion-project.github.io\n"
|
||||
"POT-Creation-Date: 2019-09-25 23:02-0600\n"
|
||||
"POT-Creation-Date: 2019-09-27 21:06-0600\n"
|
||||
"PO-Revision-Date: 2018-10-13 12:02-0600\n"
|
||||
"Last-Translator: MrDave <MotionMrDave@gmail.com>\n"
|
||||
"Language-Team: MrDave <MotionMrDave@gmail.com>\n"
|
||||
@@ -1263,6 +1263,10 @@ msgstr ""
|
||||
msgid "Unable to return a buffer to the camera video port"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
#, c-format
|
||||
msgid "Resizing pre_capture buffer to %d items"
|
||||
@@ -2577,10 +2581,6 @@ msgstr ""
|
||||
msgid "After_REL_Y_Angel : x= %d , Y= %d"
|
||||
msgstr ""
|
||||
|
||||
#: src/translate.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/video_common.c
|
||||
msgid "Corrupt image ... continue"
|
||||
msgstr ""
|
||||
|
||||
10
po/ko.po
10
po/ko.po
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 4.x\n"
|
||||
"Report-Msgid-Bugs-To: https://motion-project.github.io\n"
|
||||
"POT-Creation-Date: 2019-09-25 23:02-0600\n"
|
||||
"POT-Creation-Date: 2019-09-27 21:06-0600\n"
|
||||
"PO-Revision-Date: 2018-10-13 12:02-0600\n"
|
||||
"Last-Translator: MrDave <MotionMrDave@gmail.com>\n"
|
||||
"Language-Team: MrDave <MotionMrDave@gmail.com>\n"
|
||||
@@ -1263,6 +1263,10 @@ msgstr ""
|
||||
msgid "Unable to return a buffer to the camera video port"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
#, c-format
|
||||
msgid "Resizing pre_capture buffer to %d items"
|
||||
@@ -2577,10 +2581,6 @@ msgstr ""
|
||||
msgid "After_REL_Y_Angel : x= %d , Y= %d"
|
||||
msgstr ""
|
||||
|
||||
#: src/translate.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/video_common.c
|
||||
msgid "Corrupt image ... continue"
|
||||
msgstr ""
|
||||
|
||||
10
po/li.po
10
po/li.po
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 4.x\n"
|
||||
"Report-Msgid-Bugs-To: https://motion-project.github.io\n"
|
||||
"POT-Creation-Date: 2019-09-25 23:02-0600\n"
|
||||
"POT-Creation-Date: 2019-09-27 21:06-0600\n"
|
||||
"PO-Revision-Date: 2018-10-13 12:02-0600\n"
|
||||
"Last-Translator: MrDave <MotionMrDave@gmail.com>\n"
|
||||
"Language-Team: MrDave <MotionMrDave@gmail.com>\n"
|
||||
@@ -1264,6 +1264,10 @@ msgstr ""
|
||||
msgid "Unable to return a buffer to the camera video port"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
msgid "Language: English"
|
||||
msgstr "Kalba: Lietuvių"
|
||||
|
||||
#: src/motion.c
|
||||
#, c-format
|
||||
msgid "Resizing pre_capture buffer to %d items"
|
||||
@@ -2578,10 +2582,6 @@ msgstr ""
|
||||
msgid "After_REL_Y_Angel : x= %d , Y= %d"
|
||||
msgstr ""
|
||||
|
||||
#: src/translate.c
|
||||
msgid "Language: English"
|
||||
msgstr "Kalba: Lietuvių"
|
||||
|
||||
#: src/video_common.c
|
||||
msgid "Corrupt image ... continue"
|
||||
msgstr ""
|
||||
|
||||
10
po/nl.po
10
po/nl.po
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 4.x\n"
|
||||
"Report-Msgid-Bugs-To: https://motion-project.github.io\n"
|
||||
"POT-Creation-Date: 2019-09-25 23:02-0600\n"
|
||||
"POT-Creation-Date: 2019-09-27 21:06-0600\n"
|
||||
"PO-Revision-Date: 2018-10-13 12:03-0600\n"
|
||||
"Last-Translator: MrDave <MotionMrDave@gmail.com>\n"
|
||||
"Language-Team: MrDave <MotionMrDave@gmail.com>\n"
|
||||
@@ -1263,6 +1263,10 @@ msgstr ""
|
||||
msgid "Unable to return a buffer to the camera video port"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
#, c-format
|
||||
msgid "Resizing pre_capture buffer to %d items"
|
||||
@@ -2577,10 +2581,6 @@ msgstr ""
|
||||
msgid "After_REL_Y_Angel : x= %d , Y= %d"
|
||||
msgstr ""
|
||||
|
||||
#: src/translate.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/video_common.c
|
||||
msgid "Corrupt image ... continue"
|
||||
msgstr ""
|
||||
|
||||
10
po/no.po
10
po/no.po
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 4.x\n"
|
||||
"Report-Msgid-Bugs-To: https://motion-project.github.io\n"
|
||||
"POT-Creation-Date: 2019-09-25 23:02-0600\n"
|
||||
"POT-Creation-Date: 2019-09-27 21:06-0600\n"
|
||||
"PO-Revision-Date: 2018-10-13 12:03-0600\n"
|
||||
"Last-Translator: MrDave <MotionMrDave@gmail.com>\n"
|
||||
"Language-Team: MrDave <MotionMrDave@gmail.com>\n"
|
||||
@@ -1263,6 +1263,10 @@ msgstr ""
|
||||
msgid "Unable to return a buffer to the camera video port"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
#, c-format
|
||||
msgid "Resizing pre_capture buffer to %d items"
|
||||
@@ -2577,10 +2581,6 @@ msgstr ""
|
||||
msgid "After_REL_Y_Angel : x= %d , Y= %d"
|
||||
msgstr ""
|
||||
|
||||
#: src/translate.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/video_common.c
|
||||
msgid "Corrupt image ... continue"
|
||||
msgstr ""
|
||||
|
||||
10
po/pt.po
10
po/pt.po
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 4.x\n"
|
||||
"Report-Msgid-Bugs-To: https://motion-project.github.io\n"
|
||||
"POT-Creation-Date: 2019-09-25 23:02-0600\n"
|
||||
"POT-Creation-Date: 2019-09-27 21:06-0600\n"
|
||||
"PO-Revision-Date: 2018-10-13 12:03-0600\n"
|
||||
"Last-Translator: MrDave <MotionMrDave@gmail.com>\n"
|
||||
"Language-Team: MrDave <MotionMrDave@gmail.com>\n"
|
||||
@@ -1263,6 +1263,10 @@ msgstr ""
|
||||
msgid "Unable to return a buffer to the camera video port"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
#, c-format
|
||||
msgid "Resizing pre_capture buffer to %d items"
|
||||
@@ -2577,10 +2581,6 @@ msgstr ""
|
||||
msgid "After_REL_Y_Angel : x= %d , Y= %d"
|
||||
msgstr ""
|
||||
|
||||
#: src/translate.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/video_common.c
|
||||
msgid "Corrupt image ... continue"
|
||||
msgstr ""
|
||||
|
||||
10
po/sv.po
10
po/sv.po
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 4.x\n"
|
||||
"Report-Msgid-Bugs-To: https://motion-project.github.io\n"
|
||||
"POT-Creation-Date: 2019-09-25 23:02-0600\n"
|
||||
"POT-Creation-Date: 2019-09-27 21:06-0600\n"
|
||||
"PO-Revision-Date: 2018-10-13 12:04-0600\n"
|
||||
"Last-Translator: MrDave <MotionMrDave@gmail.com>\n"
|
||||
"Language-Team: MrDave <MotionMrDave@gmail.com>\n"
|
||||
@@ -1263,6 +1263,10 @@ msgstr ""
|
||||
msgid "Unable to return a buffer to the camera video port"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
msgid "Language: English"
|
||||
msgstr "Språk: Svenska"
|
||||
|
||||
#: src/motion.c
|
||||
#, c-format
|
||||
msgid "Resizing pre_capture buffer to %d items"
|
||||
@@ -2577,10 +2581,6 @@ msgstr ""
|
||||
msgid "After_REL_Y_Angel : x= %d , Y= %d"
|
||||
msgstr ""
|
||||
|
||||
#: src/translate.c
|
||||
msgid "Language: English"
|
||||
msgstr "Språk: Svenska"
|
||||
|
||||
#: src/video_common.c
|
||||
msgid "Corrupt image ... continue"
|
||||
msgstr ""
|
||||
|
||||
10
po/zh.po
10
po/zh.po
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 4.x\n"
|
||||
"Report-Msgid-Bugs-To: https://motion-project.github.io\n"
|
||||
"POT-Creation-Date: 2019-09-25 23:02-0600\n"
|
||||
"POT-Creation-Date: 2019-09-27 21:06-0600\n"
|
||||
"PO-Revision-Date: 2018-10-13 12:04-0600\n"
|
||||
"Last-Translator: MrDave <MotionMrDave@gmail.com>\n"
|
||||
"Language-Team: MrDave <MotionMrDave@gmail.com>\n"
|
||||
@@ -1263,6 +1263,10 @@ msgstr ""
|
||||
msgid "Unable to return a buffer to the camera video port"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/motion.c
|
||||
#, c-format
|
||||
msgid "Resizing pre_capture buffer to %d items"
|
||||
@@ -2577,10 +2581,6 @@ msgstr ""
|
||||
msgid "After_REL_Y_Angel : x= %d , Y= %d"
|
||||
msgstr ""
|
||||
|
||||
#: src/translate.c
|
||||
msgid "Language: English"
|
||||
msgstr ""
|
||||
|
||||
#: src/video_common.c
|
||||
msgid "Corrupt image ... continue"
|
||||
msgstr ""
|
||||
|
||||
@@ -11,6 +11,6 @@ bin_PROGRAMS = motion
|
||||
motion_SOURCES = motion.c logger.c conf.c draw.c jpegutils.c video_loopback.c \
|
||||
video_v4l2.c video_common.c \
|
||||
netcam.c track.c alg.c event.c picture.c \
|
||||
rotate.c translate.c movie.c \
|
||||
rotate.c movie.c \
|
||||
webu.c webu_html.c webu_stream.c webu_text.c mmalcam.c $(MMAL_SRC)
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <dirent.h>
|
||||
#include <string.h>
|
||||
#include <regex.h>
|
||||
#include "translate.h"
|
||||
#include "motion.h"
|
||||
|
||||
#define EXTENSION ".conf"
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
see also the file 'COPYING'.
|
||||
*/
|
||||
#include "picture.h" /* already includes motion.h */
|
||||
#include "translate.h"
|
||||
#include "netcam.h"
|
||||
#include "movie.h"
|
||||
#include "event.h"
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
* jpgutl_decode_jpeg
|
||||
*/
|
||||
|
||||
#include "translate.h"
|
||||
#include "config.h"
|
||||
#include "motion.h"
|
||||
#include "jpegutils.h"
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "translate.h"
|
||||
#include "motion.h"
|
||||
#include "rotate.h"
|
||||
|
||||
|
||||
54
src/motion.c
54
src/motion.c
@@ -6,7 +6,6 @@
|
||||
* See also the file 'COPYING'.
|
||||
*
|
||||
*/
|
||||
#include "translate.h"
|
||||
#include "motion.h"
|
||||
#include "movie.h"
|
||||
#include "video_common.h"
|
||||
@@ -70,6 +69,59 @@ FILE *ptr_logfile = NULL;
|
||||
unsigned int restart = 0;
|
||||
|
||||
|
||||
void translate_locale_chg(const char *langcd){
|
||||
#ifdef HAVE_GETTEXT
|
||||
/* This routine is for development testing only. It is not used for
|
||||
* regular users because once this locale is change, it changes the
|
||||
* whole computer over to the new locale. Therefore, we just return
|
||||
*/
|
||||
return;
|
||||
|
||||
setenv ("LANGUAGE", langcd, 1);
|
||||
/* Invoke external function to change locale*/
|
||||
++_nl_msg_cat_cntr;
|
||||
#else
|
||||
if (langcd != NULL) MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO,"No native language support");
|
||||
#endif
|
||||
}
|
||||
|
||||
void translate_init(void){
|
||||
#ifdef HAVE_GETTEXT
|
||||
/* Set the flag to enable native language support */
|
||||
nls_enabled = 1;
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
//translate_locale_chg("li");
|
||||
translate_locale_chg("es");
|
||||
|
||||
bindtextdomain ("motion", LOCALEDIR);
|
||||
bind_textdomain_codeset ("motion", "UTF-8");
|
||||
textdomain ("motion");
|
||||
|
||||
MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO,_("Language: English"));
|
||||
|
||||
#else
|
||||
/* Disable native language support */
|
||||
nls_enabled = 0;
|
||||
|
||||
/* This avoids a unused function warning */
|
||||
translate_locale_chg("en");
|
||||
#endif
|
||||
}
|
||||
|
||||
char* translate_text(const char *msgid){
|
||||
#ifdef HAVE_GETTEXT
|
||||
if (nls_enabled){
|
||||
return (char*)gettext(msgid);
|
||||
} else {
|
||||
return (char*)msgid;
|
||||
}
|
||||
#else
|
||||
return (char*)msgid;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* image_ring_resize
|
||||
*
|
||||
|
||||
13
src/motion.h
13
src/motion.h
@@ -35,6 +35,7 @@ struct image_data;
|
||||
#ifndef __USE_GNU
|
||||
#define __USE_GNU
|
||||
#endif
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
@@ -68,6 +69,14 @@ struct image_data;
|
||||
#include "mmalcam.h"
|
||||
#endif
|
||||
|
||||
int nls_enabled;
|
||||
|
||||
#ifdef HAVE_GETTEXT
|
||||
# include <libintl.h>
|
||||
extern int _nl_msg_cat_cntr; /* Required for changing the locale dynamically */
|
||||
#endif
|
||||
|
||||
#define _(STRING) translate_text(STRING)
|
||||
|
||||
/**
|
||||
* ATTRIBUTE_UNUSED:
|
||||
@@ -541,4 +550,8 @@ void util_threadname_set(const char *abbr, int threadnbr, const char *threadname
|
||||
void util_threadname_get(char *threadname);
|
||||
int util_check_passthrough(struct context *cnt);
|
||||
|
||||
char* translate_text(const char *msgid);
|
||||
void translate_init(void);
|
||||
void translate_locale_chg(const char *langcd);
|
||||
|
||||
#endif /* _INCLUDE_MOTION_H */
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
* indicate libav
|
||||
*/
|
||||
|
||||
#include "translate.h"
|
||||
#include "motion.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <regex.h>
|
||||
#include "translate.h"
|
||||
#include "rotate.h" /* already includes motion.h */
|
||||
#include "netcam.h"
|
||||
#include "video_v4l2.h" /* Needed to validate palette for v4l2 via netcam */
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "translate.h"
|
||||
#include "picture.h"
|
||||
#include "jpegutils.h"
|
||||
#include "event.h"
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
* - speed optimization, including bswap
|
||||
* v1 (28-Aug-2004) - initial version
|
||||
*/
|
||||
#include "translate.h"
|
||||
#include "rotate.h"
|
||||
#include <stdint.h>
|
||||
#if defined(__APPLE__)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
* This program is published under the GNU Public license
|
||||
*/
|
||||
#include <math.h>
|
||||
#include "translate.h"
|
||||
#include "motion.h"
|
||||
|
||||
#ifdef HAVE_V4L2
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
/*
|
||||
* Translations for Web User control interface.
|
||||
*
|
||||
* This software is distributed under the GNU Public License Version 2
|
||||
* See also the file 'COPYING'.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <locale.h>
|
||||
#include "motion.h"
|
||||
#include "translate.h"
|
||||
|
||||
void translate_locale_chg(const char *langcd){
|
||||
#ifdef HAVE_GETTEXT
|
||||
/* This routine is for development testing only. It is not used for
|
||||
* regular users because once this locale is change, it changes the
|
||||
* whole computer over to the new locale. Therefore, we just return
|
||||
*/
|
||||
return;
|
||||
|
||||
setenv ("LANGUAGE", langcd, 1);
|
||||
/* Invoke external function to change locale*/
|
||||
++_nl_msg_cat_cntr;
|
||||
#else
|
||||
if (langcd != NULL) MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO,"No native language support");
|
||||
#endif
|
||||
}
|
||||
|
||||
void translate_init(void){
|
||||
#ifdef HAVE_GETTEXT
|
||||
/* Set the flag to enable native language support */
|
||||
nls_enabled = 1;
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
//translate_locale_chg("li");
|
||||
translate_locale_chg("es");
|
||||
|
||||
bindtextdomain ("motion", LOCALEDIR);
|
||||
bind_textdomain_codeset ("motion", "UTF-8");
|
||||
textdomain ("motion");
|
||||
|
||||
MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO,_("Language: English"));
|
||||
|
||||
#else
|
||||
/* Disable native language support */
|
||||
nls_enabled = 0;
|
||||
|
||||
/* This avoids a unused function warning */
|
||||
translate_locale_chg("en");
|
||||
#endif
|
||||
}
|
||||
|
||||
char* translate_text(const char *msgid){
|
||||
#ifdef HAVE_GETTEXT
|
||||
if (nls_enabled){
|
||||
return (char*)gettext(msgid);
|
||||
} else {
|
||||
return (char*)msgid;
|
||||
}
|
||||
#else
|
||||
return (char*)msgid;
|
||||
#endif
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* translate.h
|
||||
*
|
||||
* Include file for translate.c
|
||||
*
|
||||
* This software is distributed under the GNU Public License Version 2
|
||||
* See also the file 'COPYING'.
|
||||
*
|
||||
*/
|
||||
#ifndef _INCLUDE_TRANSLATE_H_
|
||||
#define _INCLUDE_TRANSLATE_H_
|
||||
|
||||
int nls_enabled;
|
||||
|
||||
#ifdef HAVE_GETTEXT
|
||||
# include <libintl.h>
|
||||
extern int _nl_msg_cat_cntr; /* Required for changing the locale dynamically */
|
||||
#endif
|
||||
|
||||
#define _(STRING) translate_text(STRING)
|
||||
|
||||
char* translate_text(const char *msgid);
|
||||
void translate_init(void);
|
||||
void translate_locale_chg(const char *langcd);
|
||||
|
||||
#endif // _INCLUDE_TRANSLATE_H_
|
||||
@@ -8,7 +8,7 @@
|
||||
* See also the file 'COPYING'.
|
||||
*
|
||||
*/
|
||||
#include "translate.h"
|
||||
|
||||
#include "motion.h"
|
||||
#include "video_common.h"
|
||||
#include "video_v4l2.h"
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* See also the file 'COPYING'.
|
||||
*
|
||||
*/
|
||||
#include "translate.h"
|
||||
#include "motion.h"
|
||||
|
||||
#if (defined(HAVE_V4L2)) && (!defined(BSD))
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
* for more details.
|
||||
*
|
||||
*/
|
||||
#include "translate.h"
|
||||
#include "rotate.h" /* Already includes motion.h */
|
||||
#include "video_common.h"
|
||||
#include "video_v4l2.h"
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
#include "webu_html.h"
|
||||
#include "webu_text.h"
|
||||
#include "webu_stream.h"
|
||||
#include "translate.h"
|
||||
|
||||
/* Context to pass the parms to functions to start mhd */
|
||||
struct mhdstart_ctx {
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "motion.h"
|
||||
#include "webu.h"
|
||||
#include "webu_html.h"
|
||||
#include "translate.h"
|
||||
|
||||
/* struct to save information regarding the links to include in html page */
|
||||
struct strminfo_ctx {
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "motion.h"
|
||||
#include "webu.h"
|
||||
#include "webu_stream.h"
|
||||
#include "translate.h"
|
||||
|
||||
static void webu_stream_mjpeg_checkbuffers(struct webui_ctx *webui) {
|
||||
/* Allocate buffers if needed */
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "motion.h"
|
||||
#include "webu.h"
|
||||
#include "webu_text.h"
|
||||
#include "translate.h"
|
||||
|
||||
static void webu_text_seteol(struct webui_ctx *webui) {
|
||||
/* Set the end of line character for text interface */
|
||||
|
||||
Reference in New Issue
Block a user