Commit 2b077e09 authored by Sven Neumann's avatar Sven Neumann
Browse files

Script-Fu internationalisation!


--Sven
parent 0c502583
Sun Feb 27 20:25:45 CET 2000 Sven Neumann <sven@gimp.org>
Script-Fu now has its own textdomain. This allows full
localisation of the Script-Fu UI. Now all that's missing
is a script that extracts the translatable trings out of
the (script-fu-register ...) calls.
* Makefile.am
* configure.in
* po-script-fu/*: new files.
* app/plug_in.c: allow translation of the temporary installed
Script-Fu scripts
* plug-ins/script-fu/Makefile.am
* plug-ins/script-fu/script-fu-intl.h: new file
* plug-ins/script-fu/script-fu-console.c
* plug-ins/script-fu/script-fu-scripts.c
* plug-ins/script-fu/script-fu-server.c
* plug-ins/script-fu/script-fu.c: bind to the gimp-script-fu
textdomain and use gettext for all labels in the script UI.
2000-02-27 Michael Natterer <mitch@gimp.org>
 
* libgimp/gimphelpui.c: added documentation.
......
......@@ -5,6 +5,7 @@ SUBDIRS = \
po \
po-libgimp \
po-plug-ins \
po-script-fu \
intl \
libgimp \
app \
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
......@@ -1839,7 +1839,6 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
break;
case PDB_TEMPORARY:
plug_in_def = current_plug_in->user_data;
prog = "none";
tmp = current_plug_in->temp_proc_defs;
......@@ -1951,8 +1950,14 @@ plug_in_handle_proc_install (GPProcInstall *proc_install)
entry.help_page = help_page;
entry.description = NULL;
/* Below we use a hack to allow translations of Script-Fu paths.
Would be nice if we could solve this properly, but I haven't
found a way yet ... (Sven) */
if (plug_in_def && plug_in_def->locale_domain)
menus_create_item_from_full_path (&entry, plug_in_def->locale_domain, proc);
else if (strncmp (proc_def->db_info.name, "script_fu", 9) == 0)
menus_create_item_from_full_path (&entry, "gimp-script-fu", proc);
else
menus_create_item_from_full_path (&entry, std_plugins_domain, proc);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment