translation-memory

translation-memory

Synopsis

                    GtranslatorTranslationMemory;
struct              GtranslatorTranslationMemoryIface;
struct              GtranslatorTranslationMemoryMatch;
gboolean            gtranslator_translation_memory_store
                                                        (GtranslatorTranslationMemory *obj,
                                                         const gchar *original,
                                                         const gchar *translation);
GList *             gtranslator_translation_memory_lookup
                                                        (GtranslatorTranslationMemory *obj,
                                                         const gchar *phrase);
void                gtranslator_translation_memory_set_max_omits
                                                        (GtranslatorTranslationMemory *obj,
                                                         gsize omits);
void                gtranslator_translation_memory_set_max_delta
                                                        (GtranslatorTranslationMemory *obj,
                                                         gsize delta);
void                gtranslator_translation_memory_set_max_items
                                                        (GtranslatorTranslationMemory *obj,
                                                         gint items);

Description

Details

GtranslatorTranslationMemory

typedef struct _GtranslatorTranslationMemory GtranslatorTranslationMemory;


struct GtranslatorTranslationMemoryIface

struct GtranslatorTranslationMemoryIface {
  GTypeInterface g_iface;


    gboolean (*store) (GtranslatorTranslationMemory * obj,
		       const gchar * original, const gchar * translation);
  GList *(*lookup) (GtranslatorTranslationMemory * obj, const gchar * phrase);
  void (*set_max_omits) (GtranslatorTranslationMemory * obj, gsize omits);
  void (*set_max_delta) (GtranslatorTranslationMemory * obj, gsize delta);
  void (*set_max_items) (GtranslatorTranslationMemory * obj, gint items);
};


struct GtranslatorTranslationMemoryMatch

struct GtranslatorTranslationMemoryMatch {
  gchar *match;
  gint level;
};


gtranslator_translation_memory_store ()

gboolean            gtranslator_translation_memory_store
                                                        (GtranslatorTranslationMemory *obj,
                                                         const gchar *original,
                                                         const gchar *translation);

Stores the original and translation strings in the database.

obj :

a GtranslatorTranslationMemory

original :

the untranslated text

translation :

the original text translated

Returns :


gtranslator_translation_memory_lookup ()

GList *             gtranslator_translation_memory_lookup
                                                        (GtranslatorTranslationMemory *obj,
                                                         const gchar *phrase);

Looks for the phrase in the database and gets a list of the GtranslatorTranslationMemoryMatch.

obj :

a GtranslatorTranslationMemory

phrase :

the unstranslated text to search for translations.

Returns :

a list of GtranslatorTranslationMemoryMatch.

gtranslator_translation_memory_set_max_omits ()

void                gtranslator_translation_memory_set_max_omits
                                                        (GtranslatorTranslationMemory *obj,
                                                         gsize omits);

Sets the number of omits used in the search.

obj :

omits :

the number of omits

gtranslator_translation_memory_set_max_delta ()

void                gtranslator_translation_memory_set_max_delta
                                                        (GtranslatorTranslationMemory *obj,
                                                         gsize delta);

Sets the difference in the length of string for searching in the database.

obj :

delta :

the difference in the length of strings

gtranslator_translation_memory_set_max_items ()

void                gtranslator_translation_memory_set_max_items
                                                        (GtranslatorTranslationMemory *obj,
                                                         gint items);

Sets the number of item to return in gtranslator_translation_memory_lookup().

obj :

items :

the max item to return in lookup