Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:[#11] Add localization for slides #13

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions data/org.vanillaos.Tour.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
<description>
<p>No description</p>
</description>
<translation type="gettext">org.vanillaos.Tour</translation>
</component>
1 change: 1 addition & 0 deletions po/LINGUAS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
en_GB
87 changes: 87 additions & 0 deletions po/en_GB.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the vanilla-installer package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: vanilla-tour\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-30 16:48+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

msgid "Vanilla OS 2 Orchid"
msgstr ""

msgid "Solid. Secure. Maintenance-free."
msgstr ""

msgid "Your Favorite Apps, Right Here"
msgstr ""

msgid "Android Compatibility"
msgstr ""

msgid "Develop, The Way You Like"
msgstr ""

msgid "Get an Overview"
msgstr ""

msgid "Configure Your Device"
msgstr ""

msgid "Connect Your Online Accounts"
msgstr ""

msgid "There is More"
msgstr ""

msgid "Let's take a short tour."
msgstr ""

msgid "Vanilla OS is developed with security in mind. Updates are automatic and run in the background, they won't get in your way."
msgstr ""

msgid "From your favorite music player, to your trusted web browser. They are all available, install them from the store."
msgstr ""

msgid "Is that app you love so much only on Android? We've got you covered, Vanilla OS supports APKs."
msgstr ""

msgid "Vanilla OS comes with APX, a tool that allows you to create integrated and extensible development environments, ready for your every need."
msgstr ""

msgid "Press the Super key to see open windows and apps."
msgstr ""

msgid "From Bluetooth devices to that wallpaper you love so much. The settings panel allows you to configure it as you like."
msgstr ""

msgid "Do you have a Gmail, Outlook, Nextcloud or other account? Connect them to your Vanilla OS device to integrate email, calendars.. everything."
msgstr ""

msgid "Find out more about all the Orchid news and features on our blog."
msgstr ""

msgid "Configure Updates"
msgstr ""

msgid "Open the Store"
msgstr ""

msgid "Open the Settings"
msgstr ""

msgid "Connect an Account"
msgstr ""

msgid "Visit the Blog"
msgstr ""
2 changes: 1 addition & 1 deletion po/meson.build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
i18n.gettext('tour', preset: 'glib')
i18n.gettext('vanilla-tour', preset: 'glib')
10 changes: 7 additions & 3 deletions vanilla_tour/slide.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

from gi.repository import Adw, Gtk, GLib
import webbrowser
import gettext
from gettext import gettext as _

gettext.textdomain("vanilla-tour")

@Gtk.Template(resource_path="/org/vanillaos/Tour/blp/slide.ui")
class Slide(Adw.Bin):
Expand All @@ -37,12 +41,12 @@ def __init__(self, slide, **kwargs):

def __build_ui(self):
self.assets_svg.set_resource(self.__slide["resource"])
self.status_page.set_title(self.__slide["title"])
self.status_page.set_description(self.__slide["description"])
self.status_page.set_title(_(self.__slide["title"]))
self.status_page.set_description(_(self.__slide["description"]))

if "action" in self.__slide:
self.btn_action.set_visible(True)
self.btn_action.set_label(self.__slide["action"]["title"])
self.btn_action.set_label(_(self.__slide["action"]["title"]))

def __on_btn_action_clicked(self, widget):
if self.__slide["action"]["callback"].startswith("url://"):
Expand Down
6 changes: 3 additions & 3 deletions vanilla_tour/vanilla-tour.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ localedir = '@localedir@'

sys.path.insert(1, pkgdatadir)
signal.signal(signal.SIGINT, signal.SIG_DFL)
locale.bindtextdomain('tour', localedir)
locale.textdomain('tour')
gettext.install('tour', localedir)
locale.bindtextdomain('vanilla-tour', localedir)
locale.textdomain('vanilla-tour')
gettext.install('vanilla-tour', localedir)

if __name__ == '__main__':
import gi
Expand Down