diff --git a/Dockerfile b/Dockerfile index 62efec59..ba59ccc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM sismics/jetty:9.2.20-jdk7 MAINTAINER benjamin.gam@gmail.com -RUN apt-get update && apt-get -y -q install tesseract-ocr tesseract-ocr-fra tesseract-ocr-jpn && \ +RUN apt-get update && apt-get -y -q install tesseract-ocr tesseract-ocr-fra tesseract-ocr-ita tesseract-ocr-kor tesseract-ocr-rus tesseract-ocr-ukr tesseract-ocr-spa tesseract-ocr-ara tesseract-ocr-hin tesseract-ocr-deu tesseract-ocr-pol tesseract-ocr-jpn tesseract-ocr-por tesseract-ocr-tha tesseract-ocr-jpn tesseract-ocr-chi-sim tesseract-ocr-chi-tra && \ apt-get clean && rm -rf /var/lib/apt/lists/* ENV TESSDATA_PREFIX /usr/share/tesseract-ocr diff --git a/docs-core/src/main/java/com/sismics/docs/core/constant/Constants.java b/docs-core/src/main/java/com/sismics/docs/core/constant/Constants.java index 13df9b5c..aba7c82d 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/constant/Constants.java +++ b/docs-core/src/main/java/com/sismics/docs/core/constant/Constants.java @@ -1,9 +1,9 @@ package com.sismics.docs.core.constant; -import java.util.List; - import com.google.common.collect.Lists; +import java.util.List; + /** * Application constants. * @@ -43,5 +43,5 @@ public class Constants { /** * Supported document languages. */ - public static final List SUPPORTED_LANGUAGES = Lists.newArrayList("eng", "fra", "jpn"); + public static final List SUPPORTED_LANGUAGES = Lists.newArrayList("eng", "fra", "ita", "deu", "spa", "por", "pol", "rus", "ukr", "ara", "hin", "chi_sim", "chi_tra", "jpn", "tha", "kor"); } diff --git a/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java b/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java index 32a3d5b8..45650b8d 100644 --- a/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java +++ b/docs-web/src/main/java/com/sismics/docs/rest/resource/DocumentResource.java @@ -13,7 +13,6 @@ import com.sismics.docs.core.event.DocumentCreatedAsyncEvent; import com.sismics.docs.core.event.DocumentDeletedAsyncEvent; import com.sismics.docs.core.event.DocumentUpdatedAsyncEvent; import com.sismics.docs.core.event.FileDeletedAsyncEvent; -import com.sismics.docs.core.model.context.AppContext; import com.sismics.docs.core.model.jpa.Acl; import com.sismics.docs.core.model.jpa.Document; import com.sismics.docs.core.model.jpa.File; @@ -67,7 +66,7 @@ public class DocumentResource extends BaseResource { * @apiSuccess {String} title Title * @apiSuccess {String} description Description * @apiSuccess {Number} create_date Create date (timestamp) - * @apiSuccess {String="eng","fra","jpn"} language Language + * @apiSuccess {String} language Language * @apiSuccess {Boolean} shared True if the document is shared * @apiSuccess {Number} file_count Number of files in this document * @apiSuccess {Object[]} tags List of tags @@ -313,7 +312,7 @@ public class DocumentResource extends BaseResource { * @apiSuccess {String} documents.title Title * @apiSuccess {String} documents.description Description * @apiSuccess {Number} documents.create_date Create date (timestamp) - * @apiSuccess {String="eng","fra","jpn"} documents.language Language + * @apiSuccess {String} documents.language Language * @apiSuccess {Boolean} documents.shared True if the document is shared * @apiSuccess {Number} documents.file_count Number of files in this document * @apiSuccess {Object[]} documents.tags List of tags @@ -529,7 +528,7 @@ public class DocumentResource extends BaseResource { * @apiParam {String} [rights] Rights * @apiParam {String[]} [tags] List of tags ID * @apiParam {String[]} [relations] List of related documents ID - * @apiParam {String="eng","fra","jpn"} language Language + * @apiParam {String} language Language * @apiParam {Number} [create_date] Create date (timestamp) * @apiSuccess {String} id Document ID * @apiError (client) ForbiddenError Access denied @@ -663,7 +662,7 @@ public class DocumentResource extends BaseResource { * @apiParam {String} [rights] Rights * @apiParam {String[]} [tags] List of tags ID * @apiParam {String[]} [relations] List of related documents ID - * @apiParam {String="eng","fra","jpn"} language Language + * @apiParam {String} language Language * @apiParam {Number} [create_date] Create date (timestamp) * @apiSuccess {String} id Document ID * @apiError (client) ForbiddenError Access denied or document not writable diff --git a/docs-web/src/main/webapp/src/img/flag/eng.png b/docs-web/src/main/webapp/src/img/flag/eng.png deleted file mode 100644 index ff701e19..00000000 Binary files a/docs-web/src/main/webapp/src/img/flag/eng.png and /dev/null differ diff --git a/docs-web/src/main/webapp/src/img/flag/fra.png b/docs-web/src/main/webapp/src/img/flag/fra.png deleted file mode 100644 index 8332c4ec..00000000 Binary files a/docs-web/src/main/webapp/src/img/flag/fra.png and /dev/null differ diff --git a/docs-web/src/main/webapp/src/img/flag/jpn.png b/docs-web/src/main/webapp/src/img/flag/jpn.png deleted file mode 100644 index 325fbad3..00000000 Binary files a/docs-web/src/main/webapp/src/img/flag/jpn.png and /dev/null differ diff --git a/docs-web/src/main/webapp/src/partial/docs/document.edit.html b/docs-web/src/main/webapp/src/partial/docs/document.edit.html index 30e9fc9b..a75fdc68 100644 --- a/docs-web/src/main/webapp/src/partial/docs/document.edit.html +++ b/docs-web/src/main/webapp/src/partial/docs/document.edit.html @@ -31,9 +31,22 @@
diff --git a/docs-web/src/main/webapp/src/partial/docs/document.view.html b/docs-web/src/main/webapp/src/partial/docs/document.view.html index 017c0b1e..f6f27bb2 100644 --- a/docs-web/src/main/webapp/src/partial/docs/document.view.html +++ b/docs-web/src/main/webapp/src/partial/docs/document.view.html @@ -41,7 +41,6 @@