plug-ins/pygimp/plug-ins/palette-offset.py prepared for translation.

2006-09-21  Sven Neumann  <sven@gimp.org>

        * plug-ins/pygimp/plug-ins/palette-offset.py
        * plug-ins/pygimp/plug-ins/palette-sort.py: prepared for translation.
This commit is contained in:
Sven Neumann 2006-09-21 12:01:54 +00:00 committed by Sven Neumann
parent bd9ec640a8
commit b17946e15e
4 changed files with 37 additions and 28 deletions

View File

@ -1,10 +1,16 @@
2006-09-21 Sven Neumann <sven@gimp.org>
* plug-ins/pygimp/plug-ins/palette-offset.py
* plug-ins/pygimp/plug-ins/palette-sort.py: prepared for translation.
2006-09-21 Sven Neumann <sven@gimp.org>
* plug-ins/pygimp/gimpui.override (_wrap_gimp_dialog_new)
* plug-ins/pygimp/pygimp-drawable.c (drw_set_name): allow String
or Unicode objects.
* plug-ins/pygimp/plug-ins/colorxhtml.py: prepared for translation.
* plug-ins/pygimp/plug-ins/colorxhtml.py
* plug-ins/pygimp/plug-ins/foggify.py: prepared for translation.
2006-09-21 Sven Neumann <sven@gimp.org>

View File

@ -14,18 +14,16 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from gimpfu import *
gettext.install("gimp20-python", gimp.locale_directory, unicode=1)
def palette_offset(palette, amount, forward):
def palette_offset(palette, amount):
#If palette is read only, work on a copy:
editable = pdb.gimp_palette_is_editable(palette)
if not editable:palette = pdb.gimp_palette_duplicate (palette)
num_colors = pdb.gimp_palette_get_info (palette)
if not forward:
amount = num_colors - amount
tmp_entry_array = []
for i in xrange (num_colors):
@ -44,20 +42,21 @@ def palette_offset(palette, amount, forward):
register(
"python-fu-palette-offset",
"Offsets a given palette",
"palette_offset (palette, amount_to_offset) -> modified_palette",
N_("Offset a color palette"),
"palette_offset (palette, amount) -> modified_palette",
"Joao S. O. Bueno Calligaris, Carol Spears",
"(c) Joao S. O. Bueno Calligaris",
"2004, 2006",
"_Offset Palette...",
N_("_Offset Palette..."),
"",
[
(PF_PALETTE, "palette", "Name of palette to offset", ""),
(PF_INT, "amount", "Amount of colors to offset", 1),
(PF_BOOL, "forward", "Offset the palette forward?", True)
(PF_PALETTE, "palette", _("Palette"), ""),
(PF_INT, "amount", _("Offset"), 1),
],
[(PF_PALETTE, "new-palette", "Name of offset palette.")],
palette_offset, menu="<Palettes>")
[(PF_PALETTE, "new-palette", "Result")],
palette_offset,
menu="<Palettes>",
domain=("gimp20-python", gimp.locale_directory)
)
main ()

View File

@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -15,9 +14,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
from gimpfu import *
gettext.install("gimp20-python", gimp.locale_directory, unicode=1)
def palette_sort (palette, model, channel, ascending):
#If palette is read only, work on a copy:
@ -47,26 +46,29 @@ def palette_sort (palette, model, channel, ascending):
register(
"python-fu-palette-sort",
"Sort the palette",
N_("Sort a palette"),
"palette_merge (palette, model, channel, ascending) -> new_palette",
"Joao S. O. Bueno Calligaris, Carol Spears",
"Joao S. O. Bueno Calligaris",
"2006",
"_Sort Palette...",
N_("_Sort Palette..."),
"",
[
(PF_PALETTE, "palette", "name of palette to sort", ""),
(PF_RADIO, "model", "Color model to sort in ", "HSV",
(("RGB", "RGB"),
("HSV", "HSV"))),
(PF_RADIO, "channel", "Channel to sort", 2,
(("Red or Hue", 0),
("Green or Saturation", 1),
("Blue or Value", 2))),
(PF_BOOL, "ascending", "Sort in ascending order", True)
(PF_PALETTE, "palette", _("Palette"), ""),
(PF_RADIO, "model", _("Color model"), "HSV",
((_("RGB"), "RGB"),
(_("HSV"), "HSV"))),
(PF_RADIO, "channel", _("Channel to sort"), 2,
((_("Red or Hue"), 0),
(_("Green or Saturation"), 1),
(_("Blue or Value"), 2))),
(PF_BOOL, "ascending", _("Ascending"), True)
],
[],
palette_sort, menu="<Palettes>")
palette_sort,
menu="<Palettes>",
domain=("gimp20-python", gimp.locale_directory)
)
main ()

View File

@ -9,3 +9,5 @@ plug-ins/pygimp/plug-ins/colorxhtml.py
plug-ins/pygimp/plug-ins/gimpcons.py
plug-ins/pygimp/plug-ins/gtkcons.py
plug-ins/pygimp/plug-ins/foggify.py
plug-ins/pygimp/plug-ins/palette-offset.py
plug-ins/pygimp/plug-ins/palette-sort.py