Browse Source

Build and installation of translation files

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.3.0-RC1
JP Cimalando falkTX <falktx@falktx.com> 3 years ago
parent
commit
3a4c4c8abb
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 34 additions and 2 deletions
  1. +3
    -0
      .gitignore
  2. +6
    -0
      Makefile
  3. +5
    -0
      source/Makefile.mk
  4. +20
    -2
      source/frontend/Makefile

+ 3
- 0
.gitignore View File

@@ -60,6 +60,9 @@ qrc_resources.cpp
ui_*.hpp
ui_*.py

# Translation files
*.qm

# Misc files
*.aria2
*.deb


+ 6
- 0
Makefile View File

@@ -442,6 +442,7 @@ ifeq ($(HAVE_PYQT),true)
install -d $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
install -d $(DESTDIR)$(DATADIR)/mime/packages
install -d $(DESTDIR)$(DATADIR)/carla/resources
install -d $(DESTDIR)$(DATADIR)/carla/resources/translations
install -d $(DESTDIR)$(DATADIR)/carla/modgui
install -d $(DESTDIR)$(DATADIR)/carla/patchcanvas
install -d $(DESTDIR)$(DATADIR)/carla/widgets
@@ -683,6 +684,11 @@ endif
$(LINK) ../ui_carla_settings_driver.py $(DESTDIR)$(DATADIR)/carla/resources
$(LINK) ../ui_inputdialog_value.py $(DESTDIR)$(DATADIR)/carla/resources
$(LINK) ../ui_midipattern.py $(DESTDIR)$(DATADIR)/carla/resources

# Install translations
$(foreach l,$(I18N_LANGUAGES),install -m 644 \
source/frontend/translations/carla_$(l).qm \
$(DESTDIR)$(DATADIR)/carla/resources/translations/;)
endif # HAVE_PYQT

# -------------------------------------------------------------------------------------------------------------


+ 5
- 0
source/Makefile.mk View File

@@ -14,6 +14,11 @@ CXX ?= g++
PKG_CONFIG ?= pkg-config
WINECC ?= winegcc

# ---------------------------------------------------------------------------------------------------------------------
# Internationalization

I18N_LANGUAGES :=

# ---------------------------------------------------------------------------------------------------------------------
# Auto-detect OS if not defined



+ 20
- 2
source/frontend/Makefile View File

@@ -12,6 +12,12 @@ include $(CWD)/Makefile.mk
BINDIR := $(CWD)/../bin
RESDIR := $(CWD)/../resources

# ---------------------------------------------------------------------------------------------------------------------
# Translations

TSs = $(patsubst %,translations/carla_%.ts,$(I18N_LANGUAGES))
QMs = $(patsubst %,translations/carla_%.qm,$(I18N_LANGUAGES))

# ---------------------------------------------------------------------------------------------------------------------
# Resources

@@ -91,7 +97,7 @@ UIs = \

# ---------------------------------------------------------------------------------------------------------------------

all: $(RES) $(UIs)
all: $(QMs) $(RES) $(UIs)

# ---------------------------------------------------------------------------------------------------------------------

@@ -116,9 +122,21 @@ $(BINDIR)/resources/zynaddsubfx-ui: ../native-plugins/resources/zynaddsubfx-ui
# ---------------------------------------------------------------------------------------------------------------------

clean:
rm -rf $(UIs) $(RES) __pycache__ *.pyc
rm -rf $(UIs) $(RES) $(QMs) __pycache__ *.pyc

debug:
$(MAKE) DEBUG=true

# ---------------------------------------------------------------------------------------------------------------------

i18n_update: $(TSs)
i18n_release: $(QMs)

translations/%.ts:
@install -d translations
pylupdate5 *.py $(RESDIR)/ui/*.ui -ts $@

%.qm: %.ts
lrelease $< -qm $@

# ---------------------------------------------------------------------------------------------------------------------

Loading…
Cancel
Save