This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add translations. (read README.md in /translations)
- Loading branch information
Showing
34 changed files
with
1,871 additions
and
410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
FROM python:3.10-slim-buster | ||
WORKDIR /app | ||
COPY requirements.txt requirements.txt | ||
FROM python:3.10-slim-buster | ||
|
||
WORKDIR /app | ||
|
||
COPY requirements.txt requirements.txt | ||
|
||
RUN python -m venv venv | ||
ENV PATH="/app/venv/bin:$PATH" | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends build-essential libffi-dev cmake libcurl4-openssl-dev && \ | ||
pip3 install --no-cache-dir -r requirements.txt | ||
|
||
COPY . . | ||
|
||
CMD ["python3", "./run.py"] | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends build-essential libffi-dev cmake libcurl4-openssl-dev && \ | ||
pip3 install --no-cache-dir -r requirements.txt | ||
|
||
COPY . . | ||
|
||
RUN chmod -R 777 translations | ||
|
||
CMD ["python3", "./run.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Contributing to Translations for FreeGPT WebUI 🌐 | ||
|
||
This README.md file was created to guide contributors on how to contribute translations to the FreeGPT WebUI project. The translations are located in the `translations` folder and are generated by `babel-flask`. | ||
|
||
## Modifying an existing translation | ||
|
||
To modify an existing translation, follow the steps below: | ||
|
||
1. Inside the `translations` folder, you will find all existing translations in the project. | ||
|
||
2. Translate the strings in the `.po` file found within the folder of the language translation you want to modify. <br> | ||
The identifiers of the strings to be translated are in the format `msgid "string"` and should be translated in the `msgstr ""` field. For example: | ||
|
||
``` | ||
msgid "New Conversation" | ||
msgstr "Nova Conversa" | ||
``` | ||
|
||
3. Add your name and GitHub profile to the "Contributors" section at the beginning of the `.po` file. If there are already contributors, add your name to the list. For example: | ||
|
||
``` | ||
# Portuguese (Brazil) translations for FreeGPT WebUI. | ||
# Copyright (C) 2023 FreeGPT WebUI. | ||
# This file is distributed under the same license as the FreeGPT WebUI | ||
# project. | ||
# Contributors: | ||
# Ramon - github.com/ramonvc/ | ||
# Your Name - github.com/yourprofile/ | ||
# ... | ||
``` | ||
|
||
4. Create a pull request with the changes so we can review and incorporate them into the project. | ||
|
||
## Adding a new language | ||
|
||
To add a new language, follow the steps below: | ||
|
||
1. Install `babel-flask` (if not already installed) using the command `pip install Flask-Babel`. | ||
|
||
2. Inside the project folder use the following code to generate the folder with the translation template, replacing LANGUAGE_CODE with the language code. Example: en_US | ||
|
||
``` | ||
pybabel init -i ./translations/messages.pot -d translations -l LANGUAGE_CODE | ||
``` | ||
|
||
3. Translate the strings in the created `.po` file. The identifiers of the strings to be translated are in the format `msgid "string"` and should be translated in the `msgstr ""` field. For example: | ||
|
||
``` | ||
msgid "New Conversation" | ||
msgstr "Nova Conversa" | ||
``` | ||
|
||
4. Add your name and GitHub profile to the "Contributors" section at the beginning of the `.po` file. For example: | ||
|
||
``` | ||
# Portuguese (Brazil) translations for FreeGPT WebUI. | ||
# Copyright (C) 2023 FreeGPT WebUI. | ||
# This file is distributed under the same license as the FreeGPT WebUI | ||
# project. | ||
# Contributors: | ||
# Ramon - github.com/ramonvc/ | ||
# ... | ||
``` | ||
|
||
5. Create a pull request with the changes so we can review and incorporate them into the project. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,70 +8,68 @@ | |
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: PROJECT VERSION\n" | ||
"Report-Msgid-Bugs-To: https://github.com/ramonvc/freegpt-webui" | ||
"/issuesMIME-Version: 1.0\n" | ||
"POT-Creation-Date: 2023-07-24 21:10-0300\n" | ||
"PO-Revision-Date: 2023-07-24 21:10-0300\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Report-Msgid-Bugs-To: https://github.com/ramonvc/freegpt-webui/issues" | ||
"MIME-Version: 1.0\n" | ||
"Language: ar_SA\n" | ||
"Language-Team: ar_SA <[email protected]>\n" | ||
"Plural-Forms: nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : " | ||
"n%100>=3 && n%100<=10 ? 3 : n%100>=0 && n%100<=2 ? 4 : 5);\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=utf-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Generated-By: Babel 2.12.1\n" | ||
|
||
#: client/html/index.html:42 | ||
#: | ||
msgid "New Conversation" | ||
msgstr "" | ||
msgstr "محادثة جديدة" | ||
|
||
#: client/html/index.html:49 | ||
#: | ||
msgid "Clear Conversations" | ||
msgstr "" | ||
msgstr "مسح المحادثات" | ||
|
||
#: client/html/index.html:54 | ||
#: | ||
msgid "API Key" | ||
msgstr "" | ||
msgstr "مفتاح API" | ||
|
||
#: client/html/index.html:57 | ||
#: | ||
msgid "Ok" | ||
msgstr "" | ||
msgstr "حسنا" | ||
|
||
#: client/html/index.html:61 | ||
#: | ||
msgid "Dark Mode" | ||
msgstr "" | ||
msgstr "الوضع الداكن" | ||
|
||
#: client/html/index.html:66 | ||
#: | ||
msgid "Language" | ||
msgstr "" | ||
msgstr "اللغة" | ||
|
||
#: client/html/index.html:89 | ||
#: | ||
msgid "Stop Generating" | ||
msgstr "" | ||
msgstr "توقف عن التوليد" | ||
|
||
#: client/html/index.html:97 | ||
#: | ||
msgid "Ask a question" | ||
msgstr "" | ||
msgstr "اسأل سؤال" | ||
|
||
#: client/html/index.html:131 | ||
#: | ||
msgid "IMAGE" | ||
msgstr "" | ||
msgstr "صورة" | ||
|
||
#: client/html/index.html:138 | ||
#: | ||
msgid "Default" | ||
msgstr "" | ||
msgstr "افتراضي" | ||
|
||
#: client/html/index.html:139 | ||
#: | ||
msgid "DAN" | ||
msgstr "" | ||
msgstr "دان" | ||
|
||
#: client/html/index.html:140 | ||
#: | ||
msgid "Evil" | ||
msgstr "" | ||
msgstr "شرير" | ||
|
||
#: client/html/index.html:147 | ||
#: | ||
msgid "Web Access" | ||
msgstr "" | ||
msgstr "الوصول إلى الويب" | ||
|
||
#: | ||
msgid "Version" | ||
msgstr "الإصدار" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Czech (Czechia) translations for FreeGPT WebUI. | ||
# Copyright (C) 2023 FreeGPT WebUI. | ||
# This file is distributed under the same license as the FreeGPT WebUI | ||
# project. | ||
# Contributors: | ||
# example name - github.com/example/ | ||
# example name2 - github.com/example2/ | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Report-Msgid-Bugs-To: https://github.com/ramonvc/freegpt-webui/issues" | ||
"MIME-Version: 1.0\n" | ||
"Language: cs_CZ\n" | ||
"Language-Team: cs_CZ <[email protected]>\n" | ||
"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n" | ||
"Content-Type: text/plain; charset=utf-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Generated-By: Babel 2.12.1\n" | ||
|
||
#: | ||
msgid "New Conversation" | ||
msgstr "Nová konverzace" | ||
|
||
#: | ||
msgid "Clear Conversations" | ||
msgstr "Vymazat konverzace" | ||
|
||
#: | ||
msgid "API Key" | ||
msgstr "API klíč" | ||
|
||
#: | ||
msgid "Ok" | ||
msgstr "Dobře" | ||
|
||
#: | ||
msgid "Dark Mode" | ||
msgstr "Tmavý režim" | ||
|
||
#: | ||
msgid "Language" | ||
msgstr "Jazyk" | ||
|
||
#: | ||
msgid "Stop Generating" | ||
msgstr "Zastavit generování" | ||
|
||
#: | ||
msgid "Ask a question" | ||
msgstr "Zeptejte se na otázku" | ||
|
||
#: | ||
msgid "IMAGE" | ||
msgstr "OBRAZ" | ||
|
||
#: | ||
msgid "Default" | ||
msgstr "Výchozí" | ||
|
||
#: | ||
msgid "DAN" | ||
msgstr "DAN" | ||
|
||
#: | ||
msgid "Evil" | ||
msgstr "Zlo" | ||
|
||
#: | ||
msgid "Web Access" | ||
msgstr "Webový přístup" | ||
|
||
#: | ||
msgid "Version" | ||
msgstr "Verze" |
Oops, something went wrong.