Commit Graph

48813 Commits

Author SHA1 Message Date
Hugo Carvalho 74b208df86 Update Portuguese translation 2022-07-08 13:34:54 +00:00
Hugo Carvalho d25750f018 Update Portuguese translation 2022-07-08 13:32:41 +00:00
Niels De Graef 1308df4dc1 meson: Fix windows installer translations 2022-07-08 10:08:14 +02:00
Niels De Graef 526a28de3f plug-ins: Make sure we initalize GimpVector4
This fixes a warning about the variable being used uninitialized.
2022-07-08 09:50:25 +02:00
Alexander Shopov 958bd47427 Update Bulgarian translation 2022-07-07 21:03:35 +00:00
Jehan 5a78326589 app: allows for empty string as language.
Language detection was not working fine on Windows when the language was
an empty string rather than NULL.
2022-07-07 22:13:28 +02:00
Jehan 32501f502b plug-ins: fix generated common plug-in files and file-wbmp localization.
The Makefile.am was apparently updated by hand in !662.

Also fixing plug-in label and doc localization, since this changed
recently and must now be localized directly on plug-in side.
2022-07-07 21:27:39 +02:00
ktoyle d1fac7bfa9 plug-ins: Create wbmp plug-in
Added plug-in that would let the Gimp program to read WBPM image files.

See #2508 and !662.
2022-07-07 19:23:35 +00:00
Jehan 25e35e17fe app: detect system language with a more robust logic.
langinfo.h is not on all systems apparently and/or the locale item we
test for may not be available everywhere. Actually even on Linux, after
testing more deeply, I could create cases where nl_langinfo() would not
return a result (if the locale is broken through environment variable
for instance). setlocale() seems to always return usable value so far,
so I fallback on it. As a last resort, I look at environment variables
(even though these may contain invalid contents.

As for Windows and macOS, I try to use more platform-specific methods.
In macOS in particular, as I understood from reports, GIMP follows
correctly the language preference order, which means we should not look
at a single (top) lang, but at the whole list of prefered languages as a
single settings to determine whether the language was changed or not.

Should fix on Windows:

> fatal error: langinfo.h: No such file or directory

and on macOS:

> error: use of undeclared identifier '_NL_IDENTIFICATION_LANGUAGE'
2022-07-07 18:58:50 +02:00
Yuri Chornoivan ccf6ecf43f Update Ukrainian translation 2022-07-07 16:44:41 +00:00
Yuri Chornoivan 4383f6aa13 Update Ukrainian translation 2022-07-07 16:43:41 +00:00
Anders Jonsson e601a6c7de Change GTK+ to GTK
GTK got rid of the + in 2019:
https://lwn.net/Articles/779305/
2022-07-07 14:02:36 +00:00
Jehan 07cd09e290 gitignore: hide various files copied by the autogen.sh step.
These files seem to have appear ever since the recent gettext changes in
commit f663d26ab5.
In particular, the call to autoreconf seems to be creating these.
2022-07-07 15:39:54 +02:00
Hugo Carvalho 15b31d1b72 Update Portuguese translation 2022-07-07 11:35:43 +00:00
Hugo Carvalho c1f0055794 Update Portuguese translation 2022-07-07 11:24:15 +00:00
Hugo Carvalho 4c0951a687 Update Portuguese translation 2022-07-07 11:21:21 +00:00
Hugo Carvalho 997edb278c Update Portuguese translation 2022-07-07 11:15:44 +00:00
Maíra Canal bc170d278b Update Brazilian Portuguese translation 2022-07-07 01:31:07 +00:00
Rodrigo Lledó 8f1f698b91 Update Spanish translation 2022-07-06 22:57:04 +00:00
Jehan 0cff1ebe91 Revert "app: force re-querying all plug-ins after a language change."
This reverts commit 82f9ae1ab7.

This is not needed anymore. Cf. previous commit which implements the
force-requery differently and much more widely based on actual language
being stored and compared between runs.
2022-07-06 19:41:00 +02:00
Jehan a7a027706b app: reload plug-ins when language changes between runs.
Since localization is fully handled plug-in side now (see #8124), we
need to make sure the query functions are run again for all plug-ins
when the UI language changes (otherwise we might end up with
localizations from the previously used languages).

We were already reloading plug-ins when explicitly changing the lang in
the Preferences, but this new implementation is much better as it's
generic. In particular, it will also handle the case when the system
language changes (or when you play with locale environment variables).
2022-07-06 19:33:00 +02:00
Jehan ca1a0e3650 plug-ins: gimp-plug-in-domain-register PDB procedure doesn't exist…
… any longer.

It's not deprecated in favor of a new name, it just doesn't exist as it
was removed in commit 81b569cb8c.
2022-07-06 16:14:03 +02:00
Jehan 9ace442ca3 NEWS: update. 2022-07-06 16:08:34 +02:00
Lukas Oberhuber 83397cbb15 quit-dialog: stops crashing on quit dialog
@jralls found uninitialized variables in the quit dialog that can cause
crashes.
2022-07-06 12:54:04 +00:00
lloyd konneker c2b13d6f91 ScriptFu: register args with proper GParamSpecs
Resolves #8328

Except existing GimpParamSpecs seem inadequate to specify less generic widget kinds.
2022-07-05 19:17:52 +00:00
Yuri Chornoivan 1ee477d45b Update Ukrainian translation 2022-07-05 14:47:43 +00:00
Lukas Oberhuber 042eddfb0a canvas: remove limits on ruler & statusbar updates
This removes rate limiting of ruler and statusbar updates which were
required to get acceptable performance on mac for drawing on the canvas.

This requires the latest changes on in Gtk 3.24 to be incorporated.
2022-07-05 13:02:30 +00:00
Jehan 27b09104d9 libgimp: procedure's arguments labels are now localized plug-in side.
Continuing the changes in #8124, let's have properties labels and blurbs
both localized on plug-in code, i.e. with gettext calls directly in
GIMP_PROC_ARG_*() calls.
Note that it was already the case for blurbs (longer description,
tooltip) as I couldn't find code where we'd localize it further down the
line. But we were running gettext on nicks (shorter description, label)
inside GimpProcedureDialog code. Let's not do this anymore.

This will make the whole localization much more clear and obvious. There
is no "later localized" case anymore. Now let's localize everything
directly when the arguments are created.
2022-07-05 14:02:10 +02:00
Jehan df074bfe09 plug-ins: label and documentation of plug-ins localized plug-in side.
This is the consequence of previous commit. Plug-ins' label and
documentation are now localized before sending these data to GIMP core.
In other words, we replace N_() macros with basic gettext calls.
2022-07-05 12:23:51 +02:00
Jehan 81b569cb8c Issue #8124: plug-in localization now totally moved plug-in side.
Plug-in localization was always partially plug-in side, especially for
things like custom GUI. But labels or blurb in GIMP (such as in menus or
action search) were localizing GIMP side.

It had many drawbacks:

- To get menu localization, a plug-in had to set up gettext, even though
  they might want to use something else for their GUI (after all, giving
  facilities for gettext is a good idea, but there is no reason to force
  using this system).
- There was a complex internal system passing the localization domain
  name, as well as the catalog file system path to core, then through
  various classes which we can now get rid of.
- There could be domain name clashes, if 2 plug-ins were to use the same
  i18n domain name. This was handled in now removed functions
  gimp_plug_in_manager_get_locale_domains() by simply keeping a unique
  one (and gimp_plug_in_manager_bind_text_domains() would just bind the
  domain to the kept directory). In other words, one of the duplicate
  plug-ins would use the wrong catalog. We could try to make the whole
  thing more complicated or try to forbid plug-ins to use any random
  name (in particular made easier with the new extension wrapper). But
  anyway this whole issue doesn't happen anymore if localization is
  fully made plug-in side, so why bother?

I tried to evaluate the advantages of the core-side localization of
plug-in labels/blurbs and could only find one theoretical: if we wanted
to keep access to the original English text. This could be useful
(theoretically) if we wanted to search (e.g. in the action search) in
both localized and English text; or if we wanted to be able to swap
easily en/l10n text in a UI without reload. But even if we were to ever
do this, it would only be possible for plug-ins (GEGL operations in
particular are localized GEGL-side), so it lacks consistency. And it's
unsure why special-casing English should really make sense for other
language natives who want text in their lang, and search in their lang.
They don't necessarily care about original.

So in the end, I decided to simplify the whole thing, make localization
of plug-ins a plug-in side thing. Core will only receive translated text
and that's it. It cuts a lot of code out of the core, simplify runtime
processing and make plug-in creation simpler to understand.

The only think I still want to look at is how exactly menu paths are
translated right now. Note that it still works, but it's possible that
some things may be worth improving/simplifying on this side too.
2022-07-05 12:22:32 +02:00
lloyd konneker fadae20618 ScriptFu: Extract informal class SFArg from script-fu-script.c
Why: puts most methods for SFArg (a struct) in one place, for ease of maintenance.
Prepares to fix issue 8328.  Prepares to make SF use GimpProcedureDialog.

Mostly moving code, with no intended change in functionality,
except fixed an property.nick for an arg is now what a script author provided,
instead of generated.

All internal to libscriptfu.  No changes to the exported API or to i18n.

Lightly tested, since more substantive changes coming for issue 8328.
ScriptFu>Test>Sphere is the test case.
2022-07-04 08:28:19 +00:00
Rodrigo Lledó 22c35bf189 Update Spanish translation 2022-07-03 12:46:08 +00:00
Martin 8b62866751 Update Slovenian translation 2022-07-03 10:21:46 +00:00
Yuri Chornoivan ba72943a5c Update Ukrainian translation 2022-07-03 05:36:25 +00:00
Jehan 5df6c735e6 NEWS: update. 2022-07-02 17:50:34 +02:00
Jehan 420f1f5332 app: s/g_warning/g_printerr/ to warn about duplicate actions.
g_warning() (as well as g_critical() and g_return_*()) are reserved for
core code bugs, and therefore triggers a debug dialog with a backtrace
to report.

Here I encountered such duplicate because ts-helloworld.scm was moved
around from scripts/ to plug-ins/ since commit d5a83429b4 and I hadn't
done a clean uninstall (so of course someone with package installation
should not have such a debug dialog). Yet it could actually happen for
various reasons, such as third-party plug-ins actually registering
identically named actions. Such reasons are not core code bugs and we
don't want to trigger a debug dialog (and have people report bugs to us
which are not actual bugs and which we have no power to fix) each time a
plug-in developer uses a too generic action name.

So instead let's just print to stderr for now. I also add the
information on which plug-in was discarded (otherwise if you actually
have 2 different plug-ins doing different things, you wouldn't know
which one is the visible one and which one can't be called).

Note that I hesitated with a g_message() which would pop-up a
user-facing error and would help them better handle their plug-in
conflict. But I'm not sure it's ideal in current state of things either.
It might be much better handled when we will have moved to recommending
extensions wrapping plug-ins.
2022-07-02 16:54:12 +02:00
Alx Sa 0d7fed93ae core: Add softproof profile to GimpImage
Adds a simulation_profile to GimpImage to allow plug-ins to access it
for CMYK import/export.
Two pdb functions were added to enable this access:
image_get_simulation_profile () and image_set_simulation_profile()
Next, it updates menu options and code to support GimpImage's
internal simulation profile. Menu items are moved from View to Image's
Color Management section.
New 'simulation-profile-changed' signal is emitted via
GimpColorManagedInterface so that relevant tools (such as the
CYMK color picker, GimpColorFrame, and future dockable
dialogue) are aware of these changes.
2022-07-02 15:26:19 +02:00
Jehan b02e47b035 po-script-fu: skip test files from translated sources.
This apparently breaks Damned Lies. Thanks to Piotr Drąg for reporting.
2022-07-01 21:33:36 +02:00
Rodrigo Lledó 2d2901cdea Update Spanish translation 2022-07-01 12:28:43 +00:00
Rodrigo Lledó 6c2f3db117 Update Spanish translation 2022-07-01 12:23:32 +00:00
Rodrigo Lledó 01e69adfe2 Update Spanish translation 2022-07-01 12:13:22 +00:00
Rodrigo Lledó 8955a9f202 Update Spanish translation 2022-07-01 12:12:03 +00:00
Rodrigo Lledó 5ae5f5e997 Update Spanish translation 2022-07-01 11:48:06 +00:00
Rodrigo Lledó 001728cfc0 Update Spanish translation 2022-07-01 11:41:59 +00:00
Tim Sabsch 4768249ce0 Update German translation 2022-06-30 19:33:10 +00:00
lloyd konneker ea81ae747d ScriptFu: delete unneeded #define G_LOG_DOMAIN
It clutters the compile log.
Compile flag -DG_LOG_DOMAIN="scriptfu" now does this.
2022-06-30 13:44:07 -04:00
lloyd konneker d5a83429b4 ScriptFu: Add script-fu-interpreter akin to other interpreters
Why:
1) users can install .scm scripts to plug-ins dir
2) Crashing scripts do not crash extension-script-fu

Scripts (.scm files) have a shebang and are executable
and in a same-named subdir of plugin dir.

Interpreter/scripts create PDB procs of type PLUGIN unlike extension-script-fu
which creates PDB procs of type TEMPORARY, owned by extension-script-fu.

Unlike other interpreters, the interpreter is-a plugin outright,
not by virtue of the script subclassing GimpPlugin and using GI.

More details in /plug-ins/script-fu/interpreter/README
2022-06-30 13:39:45 +00:00
Zurab Kargareteli a0ba969450 Update Georgian translation 2022-06-30 13:04:12 +00:00
Zurab Kargareteli 5be4801cb8 Update Georgian translation 2022-06-30 13:02:16 +00:00
Martin f45fb06289 Update Slovenian translation 2022-06-29 23:47:53 +00:00