chore: initial localization support
Some checks failed
CI / Rustfmt (push) Failing after 14s
CI / Flatpak (push) Failing after 2m0s

This commit is contained in:
Tine Jozelj 2023-07-17 11:43:37 +02:00
parent 65c3d07b3d
commit 0059723805
Signed by: mentos1386
SSH key fingerprint: SHA256:MNtTsLbihYaWF8j1fkOHfkKNlnN1JQfxEU/rBU8nCGw
10 changed files with 276 additions and 14 deletions

View file

@ -1,16 +1,26 @@
# `gtk-Transcription`
# `gtk-transcription`
## Building the project
Make sure you have `flatpak` and `flatpak-builder` installed. Then run the commands below. Please note that these commands are just for demonstration purposes. Normally this would be handled by your IDE, such as GNOME Builder or VS Code with the Flatpak extension.
```
```sh
flatpak install --user org.gnome.Sdk//43 org.freedesktop.Sdk.Extension.rust-stable//22.08 org.gnome.Platform//43 org.freedesktop.Sdk.Extension.llvm14//22.08
flatpak-builder --user flatpak_app build-aux/dev.mnts.Transcription.Devel.json
```
## Running the project
```
```sh
flatpak-builder --run flatpak_app build-aux/dev.mnts.Transcription.Devel.json Transcription
```
### Contributing
### Generating `po` and `pot` files.
```sh
meson build build/
cd build
meson compile gtk-transcription-update-po
```

View file

@ -1,6 +1,6 @@
[Desktop Entry]
Name=Transcription
Comment=Write a GTK + Rust application
Comment=Transcription of voice using Whisper by OpenAI.
Type=Application
Exec=gtk-transcription
Terminal=false
@ -10,3 +10,5 @@ Keywords=Gnome;GTK;
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=@icon@
StartupNotify=true

View file

@ -3,12 +3,11 @@
<component type="desktop-application">
<id>@app-id@</id>
<metadata_license>CC0</metadata_license>
<!-- Insert your license of choice here -->
<!-- <project_license>MIT</project_license> -->
<project_license>GPL-3.0-only</project_license>
<name>Transcription</name>
<summary>Automated Voice Transcription</summary>
<summary>Transcription of voice using Whisper by OpenAI.</summary>
<description>
<p>Transcription of voice using Whisper by OpenAI.</p>
<p>Longer description.</p>
</description>
<screenshots>
<screenshot type="default">
@ -16,8 +15,8 @@
<caption>Main window</caption>
</screenshot>
</screenshots>
<url type="homepage">https://gitlab.gnome.org/bilelmoussaoui/gtk-transcription</url>
<url type="bugtracker">https://gitlab.gnome.org/bilelmoussaoui/gtk-transcription/issues</url>
<url type="homepage">https://github.com/mentos1386/gtk-transcription</url>
<url type="bugtracker">https://github.com/mentos1386/gtk-transcription</url>
<content_rating type="oars-1.0"/>
<releases>
<release version="0.1.0" date="2019-07-11"/>

View file

@ -3,15 +3,15 @@
<menu id="primary_menu">
<section>
<item>
<attribute name="label" translatable="yes">_Preferences</attribute>
<attribute name="label" translatable="yes">Preferences</attribute>
<attribute name="action">app.preferences</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
<attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_About Transcription</attribute>
<attribute name="label" translatable="yes">About Transcription</attribute>
<attribute name="action">app.about</attribute>
</item>
</section>

View file

@ -3,7 +3,7 @@ project(
'rust',
version: '0.1.0',
meson_version: '>= 0.59',
# license: 'MIT',
license: 'GPL-3.0-only',
)
i18n = import('i18n')

View file

@ -0,0 +1 @@
en si

View file

@ -1,6 +1,13 @@
data/dev.mnts.Transcription.desktop.in.in
data/dev.mnts.Transcription.gschema.xml.in
data/dev.mnts.Transcription.metainfo.xml.in.in
# find src -name "*.ui" -print
data/resources/ui/shortcuts.ui
data/resources/ui/window.ui
# find src -name "*.blp" -print
# grep gettext src/**/*.rs | cut -d: -f1 | uniq
src/application.rs
src/main.rs

75
po/en.po Normal file
View file

@ -0,0 +1,75 @@
#: data/dev.mnts.Transcription.desktop.in.in:3
#: data/dev.mnts.Transcription.metainfo.xml.in.in:7
#: data/resources/ui/window.ui:27 src/main.rs:21
msgid "Transcription"
msgstr "Transcription"
#: data/dev.mnts.Transcription.desktop.in.in:4
#: data/dev.mnts.Transcription.metainfo.xml.in.in:8
msgid "Transcription of voice using Whisper by OpenAI."
msgstr ""
#. Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
#: data/dev.mnts.Transcription.desktop.in.in:10
msgid "Gnome;GTK;"
msgstr ""
#: data/dev.mnts.Transcription.gschema.xml.in:6
msgid "Window width"
msgstr ""
#: data/dev.mnts.Transcription.gschema.xml.in:10
msgid "Window height"
msgstr ""
#: data/dev.mnts.Transcription.gschema.xml.in:14
msgid "Window maximized state"
msgstr ""
#: data/dev.mnts.Transcription.metainfo.xml.in.in:10
msgid "Longer description."
msgstr ""
#: data/dev.mnts.Transcription.metainfo.xml.in.in:15
msgid "Main window"
msgstr ""
#: data/dev.mnts.Transcription.metainfo.xml.in.in:32
msgid "Tine Jozelj"
msgstr ""
#: data/resources/ui/shortcuts.ui:11
msgctxt "shortcut window"
msgid "General"
msgstr ""
#: data/resources/ui/shortcuts.ui:14
msgctxt "shortcut window"
msgid "Show Shortcuts"
msgstr ""
#: data/resources/ui/shortcuts.ui:20
msgctxt "shortcut window"
msgid "Quit"
msgstr ""
#: data/resources/ui/window.ui:6
msgid "Preferences"
msgstr ""
#: data/resources/ui/window.ui:10
msgid "Keyboard Shortcuts"
msgstr ""
#: data/resources/ui/window.ui:14
#, fuzzy
msgid "About Transcription"
msgstr "Transcription"
#: data/resources/ui/window.ui:40
msgid "Hello world!"
msgstr ""
#: src/application.rs:120
msgid "translator-credits"
msgstr ""

93
po/gtk-transcription.pot Normal file
View file

@ -0,0 +1,93 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the gtk-transcription package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: gtk-transcription\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-17 11:31+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: data/dev.mnts.Transcription.desktop.in.in:3
#: data/dev.mnts.Transcription.metainfo.xml.in.in:7
#: data/resources/ui/window.ui:27 src/main.rs:21
msgid "Transcription"
msgstr ""
#: data/dev.mnts.Transcription.desktop.in.in:4
#: data/dev.mnts.Transcription.metainfo.xml.in.in:8
msgid "Transcription of voice using Whisper by OpenAI."
msgstr ""
#. Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
#: data/dev.mnts.Transcription.desktop.in.in:10
msgid "Gnome;GTK;"
msgstr ""
#: data/dev.mnts.Transcription.gschema.xml.in:6
msgid "Window width"
msgstr ""
#: data/dev.mnts.Transcription.gschema.xml.in:10
msgid "Window height"
msgstr ""
#: data/dev.mnts.Transcription.gschema.xml.in:14
msgid "Window maximized state"
msgstr ""
#: data/dev.mnts.Transcription.metainfo.xml.in.in:10
msgid "Longer description."
msgstr ""
#: data/dev.mnts.Transcription.metainfo.xml.in.in:15
msgid "Main window"
msgstr ""
#: data/dev.mnts.Transcription.metainfo.xml.in.in:32
msgid "Tine Jozelj"
msgstr ""
#: data/resources/ui/shortcuts.ui:11
msgctxt "shortcut window"
msgid "General"
msgstr ""
#: data/resources/ui/shortcuts.ui:14
msgctxt "shortcut window"
msgid "Show Shortcuts"
msgstr ""
#: data/resources/ui/shortcuts.ui:20
msgctxt "shortcut window"
msgid "Quit"
msgstr ""
#: data/resources/ui/window.ui:6
msgid "Preferences"
msgstr ""
#: data/resources/ui/window.ui:10
msgid "Keyboard Shortcuts"
msgstr ""
#: data/resources/ui/window.ui:14
msgid "About Transcription"
msgstr ""
#: data/resources/ui/window.ui:40
msgid "Hello world!"
msgstr ""
#: src/application.rs:120
msgid "translator-credits"
msgstr ""

75
po/si.po Normal file
View file

@ -0,0 +1,75 @@
#: data/dev.mnts.Transcription.desktop.in.in:3
#: data/dev.mnts.Transcription.metainfo.xml.in.in:7
#: data/resources/ui/window.ui:27 src/main.rs:21
msgid "Transcription"
msgstr "Transkripcija"
#: data/dev.mnts.Transcription.desktop.in.in:4
#: data/dev.mnts.Transcription.metainfo.xml.in.in:8
msgid "Transcription of voice using Whisper by OpenAI."
msgstr ""
#. Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
#: data/dev.mnts.Transcription.desktop.in.in:10
msgid "Gnome;GTK;"
msgstr ""
#: data/dev.mnts.Transcription.gschema.xml.in:6
msgid "Window width"
msgstr ""
#: data/dev.mnts.Transcription.gschema.xml.in:10
msgid "Window height"
msgstr ""
#: data/dev.mnts.Transcription.gschema.xml.in:14
msgid "Window maximized state"
msgstr ""
#: data/dev.mnts.Transcription.metainfo.xml.in.in:10
msgid "Longer description."
msgstr ""
#: data/dev.mnts.Transcription.metainfo.xml.in.in:15
msgid "Main window"
msgstr ""
#: data/dev.mnts.Transcription.metainfo.xml.in.in:32
msgid "Tine Jozelj"
msgstr ""
#: data/resources/ui/shortcuts.ui:11
msgctxt "shortcut window"
msgid "General"
msgstr ""
#: data/resources/ui/shortcuts.ui:14
msgctxt "shortcut window"
msgid "Show Shortcuts"
msgstr ""
#: data/resources/ui/shortcuts.ui:20
msgctxt "shortcut window"
msgid "Quit"
msgstr ""
#: data/resources/ui/window.ui:6
msgid "Preferences"
msgstr ""
#: data/resources/ui/window.ui:10
msgid "Keyboard Shortcuts"
msgstr ""
#: data/resources/ui/window.ui:14
#, fuzzy
msgid "About Transcription"
msgstr "O Transkripciji"
#: data/resources/ui/window.ui:40
msgid "Hello world!"
msgstr "Pozdravljen svet!"
#: src/application.rs:120
msgid "translator-credits"
msgstr ""