mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
init gettext/i18n localization support
This commit is contained in:
parent
16ef621a43
commit
571b83fd6d
6 changed files with 34 additions and 7 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1 +1,7 @@
|
||||||
*.o
|
*.o
|
||||||
|
*.cache
|
||||||
|
*.log
|
||||||
|
*.status
|
||||||
|
configure
|
||||||
|
configure~
|
||||||
|
Makefile
|
||||||
16
README.md
16
README.md
|
|
@ -10,7 +10,7 @@ GTK 4 / C++ implementation branch
|
||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
|
|
||||||
* `sudo apt install git libgtkmm-4.0-dev`
|
* `sudo apt install git libgtkmm-4.0-dev libglibmm-2.68-dev`
|
||||||
* `git clone https://github.com/YGGverse/Yoda.git`
|
* `git clone https://github.com/YGGverse/Yoda.git`
|
||||||
* `cd Yoda`
|
* `cd Yoda`
|
||||||
* `git checkout master`
|
* `git checkout master`
|
||||||
|
|
@ -22,11 +22,23 @@ GTK 4 / C++ implementation branch
|
||||||
* `make clean`
|
* `make clean`
|
||||||
* `make`
|
* `make`
|
||||||
|
|
||||||
|
## Localization
|
||||||
|
|
||||||
|
### Official
|
||||||
|
|
||||||
|
* [Crowdin](https://crowdin.com/project/yoda-browser)
|
||||||
|
|
||||||
|
### Personal
|
||||||
|
|
||||||
|
* `sudo apt install intltool`
|
||||||
|
* `cd po`
|
||||||
|
* `intltool-update --pot`
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
### Environment
|
### Environment
|
||||||
|
|
||||||
* `pkg-config --cflags --libs gtkmm-4.0`
|
* `pkg-config --cflags --libs gtkmm-4.0 glibmm-2.68`
|
||||||
|
|
||||||
### Contribution
|
### Contribution
|
||||||
|
|
||||||
|
|
|
||||||
1
po/.gitignore
vendored
Normal file
1
po/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
*.pot
|
||||||
4
po/POTFILES.in
Normal file
4
po/POTFILES.in
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
src/app/browser.cpp
|
||||||
|
src/app/browser.h
|
||||||
|
src/main.cpp
|
||||||
|
src/main.h
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef APP_BROWSER_H
|
#ifndef APP_BROWSER_H
|
||||||
#define APP_BROWSER_H
|
#define APP_BROWSER_H
|
||||||
|
|
||||||
|
#include <glibmm/i18n.h>
|
||||||
|
|
||||||
#include <gtkmm/applicationwindow.h>
|
#include <gtkmm/applicationwindow.h>
|
||||||
#include <gtkmm/headerbar.h>
|
#include <gtkmm/headerbar.h>
|
||||||
#include <gtkmm/menubutton.h>
|
#include <gtkmm/menubutton.h>
|
||||||
|
|
@ -12,7 +14,7 @@ namespace app
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
const Glib::ustring TITLE = "Yoda";
|
const char* TITLE = _("Yoda");
|
||||||
const int WIDTH = 640;
|
const int WIDTH = 640;
|
||||||
const int HEIGHT = 480;
|
const int HEIGHT = 480;
|
||||||
|
|
||||||
|
|
@ -30,7 +32,7 @@ namespace app
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
const Glib::ustring TOOLTIP = "Menu";
|
const char* TOOLTIP = _("Menu");
|
||||||
|
|
||||||
Menu();
|
Menu();
|
||||||
};
|
};
|
||||||
|
|
@ -39,8 +41,8 @@ namespace app
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
const Glib::ustring ICON = "tab-new-symbolic";
|
const char* ICON = "tab-new-symbolic";
|
||||||
const Glib::ustring TOOLTIP = "New tab";
|
const char* TOOLTIP = _("New tab");
|
||||||
|
|
||||||
Tab();
|
Tab();
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,12 @@ int main(
|
||||||
int argc,
|
int argc,
|
||||||
char* argv[]
|
char* argv[]
|
||||||
) {
|
) {
|
||||||
|
// Init app
|
||||||
auto app = Gtk::Application::create(
|
auto app = Gtk::Application::create(
|
||||||
APPLICATION_ID
|
APPLICATION_ID
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Launch browser component
|
||||||
return app->make_window_and_run<app::Browser>(
|
return app->make_window_and_run<app::Browser>(
|
||||||
argc,
|
argc,
|
||||||
argv
|
argv
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue