Skip to content
Commits on Source (2)
...@@ -45,6 +45,10 @@ namespace GQPE { ...@@ -45,6 +45,10 @@ namespace GQPE {
*/ */
REVERSE_PORTRAIT = 8; REVERSE_PORTRAIT = 8;
/**
* Returns a string representation of the orientation.
* @return a string representation of the orientation.
*/
public string to_string() { public string to_string() {
switch (this) { switch (this) {
case LANDSCAPE: return "landscape"; case LANDSCAPE: return "landscape";
......
...@@ -201,6 +201,10 @@ namespace GQPE { ...@@ -201,6 +201,10 @@ namespace GQPE {
return this.datetime.compare(photograph.datetime); return this.datetime.compare(photograph.datetime);
} }
/**
* Copies the GPS data from the received photograph.
* @param photo the photograph.
*/
public void copy_gps_data(Photograph photo) { public void copy_gps_data(Photograph photo) {
latitude = photo.latitude; latitude = photo.latitude;
longitude = photo.longitude; longitude = photo.longitude;
...@@ -210,6 +214,12 @@ namespace GQPE { ...@@ -210,6 +214,12 @@ namespace GQPE {
has_geolocation = photo.has_geolocation; has_geolocation = photo.has_geolocation;
} }
/**
* Copies the metadata from the received photograph.
* @param photo the photograph.
* @param no_gps whether to skip the GPS data.
* @param no_datetime whether to skip the datetime data.
*/
public void copy_metadata(Photograph photo, public void copy_metadata(Photograph photo,
bool no_gps = false, bool no_gps = false,
bool no_datetime = false) { bool no_datetime = false) {
...@@ -317,8 +327,8 @@ namespace GQPE { ...@@ -317,8 +327,8 @@ namespace GQPE {
private void get_metadata() throws GLib.Error { private void get_metadata() throws GLib.Error {
title = (metadata.has_tag(Tag.TITLE.tag())) ? title = (metadata.has_tag(Tag.TITLE.tag())) ?
metadata.try_get_tag_string(Tag.TITLE.tag()).strip() : ""; metadata.try_get_tag_string(Tag.TITLE.tag()).strip() : "";
album = (metadata.has_tag(Tag.SUBJECT.tag())) ? album = (metadata.has_tag(Tag.ALBUM.tag())) ?
metadata.try_get_tag_string(Tag.SUBJECT.tag()).strip() : ""; metadata.try_get_tag_string(Tag.ALBUM.tag()).strip() : "";
comment = (metadata.has_tag(Tag.DESCRIPTION.tag())) ? comment = (metadata.has_tag(Tag.DESCRIPTION.tag())) ?
metadata.try_get_tag_string(Tag.DESCRIPTION.tag()).strip() metadata.try_get_tag_string(Tag.DESCRIPTION.tag()).strip()
: ""; : "";
...@@ -373,8 +383,8 @@ namespace GQPE { ...@@ -373,8 +383,8 @@ namespace GQPE {
private void set_metadata() throws GLib.Error { private void set_metadata() throws GLib.Error {
metadata.clear_tag(Tag.TITLE.tag()); metadata.clear_tag(Tag.TITLE.tag());
metadata.try_set_tag_string(Tag.TITLE.tag(), title); metadata.try_set_tag_string(Tag.TITLE.tag(), title);
metadata.clear_tag(Tag.SUBJECT.tag()); metadata.clear_tag(Tag.ALBUM.tag());
metadata.try_set_tag_string(Tag.SUBJECT.tag(), album); metadata.try_set_tag_string(Tag.ALBUM.tag(), album);
metadata.clear_tag(Tag.DESCRIPTION.tag()); metadata.clear_tag(Tag.DESCRIPTION.tag());
metadata.try_set_tag_string(Tag.DESCRIPTION.tag(), comment); metadata.try_set_tag_string(Tag.DESCRIPTION.tag(), comment);
metadata.clear_tag(Tag.DATETIME.tag()); metadata.clear_tag(Tag.DATETIME.tag());
......
...@@ -199,8 +199,8 @@ namespace GQPE { ...@@ -199,8 +199,8 @@ namespace GQPE {
r += s; r += s;
s = s.next_char(); s = s.next_char();
} }
r += "..."; r += "";
for (int i = 0; i < word.char_count() - width - 3; i++) for (int i = 0; i < word.char_count() - width - 1; i++)
s = s.next_char(); s = s.next_char();
for (int i = width / 2 + 2; i < width; i++) { for (int i = width / 2 + 2; i < width; i++) {
r += s; r += s;
......
...@@ -24,39 +24,39 @@ namespace GQPE { ...@@ -24,39 +24,39 @@ namespace GQPE {
public enum Tag { public enum Tag {
/** /**
* Date and time tag. * Title tag.
*/ */
DATETIME, TITLE,
/** /**
* The timezone offset * Album tag.
*/ */
TIMEZONE_OFFSET, ALBUM,
/** /**
* Orientation tag. * Description tag.
*/ */
ORIENTATION, DESCRIPTION,
/** /**
* Thumbnail orientation tag. * Date and time tag.
*/ */
THUMB_ORIENTATION, DATETIME,
/** /**
* Subject tag. * The timezone offset
*/ */
SUBJECT, TIMEZONE_OFFSET,
/** /**
* Caption tag. * Orientation tag.
*/ */
TITLE, ORIENTATION,
/** /**
* Description tag. * Thumbnail orientation tag.
*/ */
DESCRIPTION, THUMB_ORIENTATION,
/** /**
* Latitude tag. * Latitude tag.
...@@ -109,13 +109,13 @@ namespace GQPE { ...@@ -109,13 +109,13 @@ namespace GQPE {
*/ */
public string tag() { public string tag() {
switch (this) { switch (this) {
case TITLE: return "Iptc.Application2.Caption";
case ALBUM: return "Xmp.dc.subject";
case DESCRIPTION: return "Exif.Image.ImageDescription";
case DATETIME: return "Exif.Photo.DateTimeOriginal"; case DATETIME: return "Exif.Photo.DateTimeOriginal";
case TIMEZONE_OFFSET: return "Exif.Image.TimeZoneOffset"; case TIMEZONE_OFFSET: return "Exif.Image.TimeZoneOffset";
case ORIENTATION: return "Exif.Image.Orientation"; case ORIENTATION: return "Exif.Image.Orientation";
case THUMB_ORIENTATION: return "Exif.Thumbnail.Orientation"; case THUMB_ORIENTATION: return "Exif.Thumbnail.Orientation";
case SUBJECT: return "Xmp.dc.subject";
case TITLE: return "Iptc.Application2.Caption";
case DESCRIPTION: return "Exif.Image.ImageDescription";
case LATITUDE: return "Exif.GPSInfo.GPSLatitude"; case LATITUDE: return "Exif.GPSInfo.GPSLatitude";
case LONGITUDE: return "Exif.GPSInfo.GPSLongitude"; case LONGITUDE: return "Exif.GPSInfo.GPSLongitude";
case LATITUDE_REF: return "Exif.GPSInfo.GPSLatitudeRef"; case LATITUDE_REF: return "Exif.GPSInfo.GPSLatitudeRef";
......
...@@ -128,12 +128,23 @@ namespace GQPE { ...@@ -128,12 +128,23 @@ namespace GQPE {
return ""; return "";
} }
/**
* Returns a normalized basename; ASCII, no spaces, no uppercase
* letters, no symbols.
* @param basename the basename.
* @return a normalized basename.
*/
public static string normalize_basename(string basename) { public static string normalize_basename(string basename) {
var n = Util.normalize(Util.get_name(basename)); var n = Util.normalize(Util.get_name(basename));
var e = Util.normalize(Util.get_extension(basename)); var e = Util.normalize(Util.get_extension(basename));
return "%s.%s".printf(n, e); return "%s.%s".printf(n, e);
} }
/**
* Returns a path without extension.
* @param path the path.
* @return a path without extension.
*/
public static string get_name(string path) { public static string get_name(string path) {
int i = path.last_index_of("."); int i = path.last_index_of(".");
if (i == 0 || i == -1) if (i == 0 || i == -1)
...@@ -141,6 +152,11 @@ namespace GQPE { ...@@ -141,6 +152,11 @@ namespace GQPE {
return path[:i]; return path[:i];
} }
/**
* Returns a path extension.
* @param path the path.
* @return a path extension.
*/
public static string get_extension(string path) { public static string get_extension(string path) {
int i = path.last_index_of("."); int i = path.last_index_of(".");
if (i == 0 || i == -1) if (i == 0 || i == -1)
...@@ -148,6 +164,11 @@ namespace GQPE { ...@@ -148,6 +164,11 @@ namespace GQPE {
return path[i+1:]; return path[i+1:];
} }
/**
* Returns the message with its first letter capitalized.
* @param message the message.
* @return the message with its first letter capitalized.
*/
public static string capitalize(string message) { public static string capitalize(string message) {
int i = message.index_of_nth_char(1); int i = message.index_of_nth_char(1);
return message.up(1) + message.substring(i); return message.up(1) + message.substring(i);
...@@ -188,7 +209,10 @@ namespace GQPE { ...@@ -188,7 +209,10 @@ namespace GQPE {
longitude = (longitude1+longitude2) / 2.0; longitude = (longitude1+longitude2) / 2.0;
} }
/* Prints an error message and exits.*/ /**
* Prints an error message and exits.
* @param format the format.
*/
[PrintfFormat] [PrintfFormat]
public static void error(string format, ...) { public static void error(string format, ...) {
var full_format = format + "\n"; var full_format = format + "\n";
......
...@@ -8,8 +8,8 @@ msgid "" ...@@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gqpe 0.1\n" "Project-Id-Version: gqpe 0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-26 03:08-0600\n" "POT-Creation-Date: 2021-11-27 17:47-0600\n"
"PO-Revision-Date: 2021-11-26 03:11-0600\n" "PO-Revision-Date: 2021-11-27 17:51-0600\n"
"Last-Translator: Canek Peláez Valdés <canek@ciencias.unam.mx>\n" "Last-Translator: Canek Peláez Valdés <canek@ciencias.unam.mx>\n"
"Language-Team: es\n" "Language-Team: es\n"
"Language: es\n" "Language: es\n"
...@@ -49,6 +49,14 @@ msgstr "Ir a geolocalización" ...@@ -49,6 +49,14 @@ msgstr "Ir a geolocalización"
msgid "Save picture" msgid "Save picture"
msgstr "Guardar imagen" msgstr "Guardar imagen"
#: data/application-window.ui:379
msgid "Open Google Maps on this location"
msgstr "Abrir Mapas de Google en esta localización"
#: data/application-window.ui:380
msgid "Google Maps"
msgstr "Mapas de Google"
#: data/gqpe.desktop.in:3 #: data/gqpe.desktop.in:3
msgid "GQPE" msgid "GQPE"
msgstr "GQPE" msgstr "GQPE"
...@@ -65,80 +73,80 @@ msgstr "Editor rápido para etiquetas de fotografía" ...@@ -65,80 +73,80 @@ msgstr "Editor rápido para etiquetas de fotografía"
msgid "A Gtk+ based quick photo editor" msgid "A Gtk+ based quick photo editor"
msgstr "Un rápido editor de fotos basado en Gtk+" msgstr "Un rápido editor de fotos basado en Gtk+"
#: src/store.vala:52 #: src/store.vala:51
msgid "INPUTDIR OUTPUTDIR - Store images to a normalized location." msgid "INPUTDIR OUTPUTDIR - Store images to a normalized location."
msgstr "ENTRADA SALIDA - Almacena imágenes a una dirección normalizada." msgstr "ENTRADA SALIDA - Almacena imágenes a una dirección normalizada."
#: src/store.vala:58 #: src/store.vala:57
msgid "Use location look up" msgid "Use location look up"
msgstr "Usar búsqueda de ubicación" msgstr "Usar búsqueda de ubicación"
#: src/store.vala:60 #: src/store.vala:59
msgid "Update the metadata of the photograph" msgid "Update the metadata of the photograph"
msgstr "Acutalizar los metadatos de la fotografía" msgstr "Acutalizar los metadatos de la fotografía"
#: src/store.vala:62 src/tags.vala:117 #: src/store.vala:61 src/tags.vala:116
msgid "Be quiet" msgid "Be quiet"
msgstr "No producir salida" msgstr "No producir salida"
#: src/store.vala:86 #: src/store.vala:85
#, c-format #, c-format
msgid "Invalid city record: %s" msgid "Invalid city record: %s"
msgstr "Registro de ciudad inválido: %s" msgstr "Registro de ciudad inválido: %s"
#: src/store.vala:101 #: src/store.vala:100
#, c-format #, c-format
msgid "An error ocurred while parsing %s" msgid "An error ocurred while parsing %s"
msgstr "Ocurrió un error al analizar %s" msgstr "Ocurrió un error al analizar %s"
#: src/store.vala:104 #: src/store.vala:103
msgid "Cities database not found" msgid "Cities database not found"
msgstr "Base de datos de ciudades no encontrada" msgstr "Base de datos de ciudades no encontrada"
#. Translators: Month name and day #. Translators: Month name and day
#: src/store.vala:130 #: src/store.vala:129
#, c-format #, c-format
msgid "%s %d" msgid "%s %d"
msgstr "%s %d" msgstr "%s %d"
#: src/store.vala:133 #: src/store.vala:132
#, c-format #, c-format
msgid "%s, near %s" msgid "%s, near %s"
msgstr "%s, cerca de %s" msgstr "%s, cerca de %s"
#: src/store.vala:162 #: src/store.vala:161
#, c-format #, c-format
msgid "There was an error processing %s: %s. " msgid "There was an error processing %s: %s. "
msgstr "Hubo un error al procesar %s: %s." msgstr "Hubo un error al procesar %s: %s."
#: src/store.vala:164 #: src/store.vala:163
msgid "Skipping.\n" msgid "Skipping.\n"
msgstr "Omitiendo.\n" msgstr "Omitiendo.\n"
#: src/store.vala:239 src/tags.vala:308 #: src/store.vala:238 src/tags.vala:307
#, c-format #, c-format
msgid "Run ‘%s --help’ for a list of options.\n" msgid "Run ‘%s --help’ for a list of options"
msgstr "Ejecute ‘%s --help’ para una lista de opciones.\n" msgstr "Ejecute ‘%s --help’ para una lista de opciones"
#: src/store.vala:246 #: src/store.vala:243
msgid "Exactly one output and one input directory needed.\n" msgid "Exactly one output and one input directory needed"
msgstr "Se necesitan exactamente un directorio entrada y de salida.\n" msgstr "Se necesitan exactamente un directorio entrada y de salida"
#: src/store.vala:258 #: src/store.vala:252
#, c-format #, c-format
msgid "%s is not a directory\n" msgid "%s is not a directory\n"
msgstr "%s no es un directorio\n" msgstr "%s no es un directorio\n"
#: src/store.vala:265 #: src/store.vala:257
#, c-format #, c-format
msgid "There was an error while storing: %s\n" msgid "There was an error while storing: %s\n"
msgstr "Ocurrió un error al almacenar: %s\n" msgstr "Ocurrió un error al almacenar: %s\n"
#: src/tags.vala:66 #: src/tags.vala:65
msgid "[FILENAME…] - Edit and show the image tags." msgid "[FILENAME…] - Edit and show the image tags."
msgstr "[ARCHIVO...] - Edita y muestra las etiquetas de imagen." msgstr "[ARCHIVO] - Edita y muestra las etiquetas de imagen."
#: src/tags.vala:71 #: src/tags.vala:70
msgid "" msgid ""
"With no flags the tags are printed. An empty string as parameter\n" "With no flags the tags are printed. An empty string as parameter\n"
"removes an individual tag.\n" "removes an individual tag.\n"
...@@ -174,170 +182,170 @@ msgstr "" ...@@ -174,170 +182,170 @@ msgstr ""
" %Y: La latitud\n" " %Y: La latitud\n"
" %X: La longitud\n" " %X: La longitud\n"
#: src/tags.vala:94 #: src/tags.vala:93
msgid "Set the title" msgid "Set the title"
msgstr "Define el título" msgstr "Define el título"
#: src/tags.vala:96 #: src/tags.vala:95
msgid "Set the comment" msgid "Set the comment"
msgstr "Define el comentario" msgstr "Define el comentario"
#: src/tags.vala:98 #: src/tags.vala:97
msgid "Set the album" msgid "Set the album"
msgstr "Define el álbum" msgstr "Define el álbum"
#: src/tags.vala:100 #: src/tags.vala:99
msgid "Set the date and time" msgid "Set the date and time"
msgstr "Define la fecha y hora" msgstr "Define la fecha y hora"
#: src/tags.vala:102 #: src/tags.vala:101
msgid "Set the timezone offset" msgid "Set the timezone offset"
msgstr "Define el desplazamiento de la zona de tiempo" msgstr "Define el desplazamiento de la zona de tiempo"
#: src/tags.vala:104 #: src/tags.vala:103
msgid "Set the orientation" msgid "Set the orientation"
msgstr "Define la orientación" msgstr "Define la orientación"
#: src/tags.vala:106 #: src/tags.vala:105
msgid "Set the latitude" msgid "Set the latitude"
msgstr "Define la latitud" msgstr "Define la latitud"
#: src/tags.vala:108 #: src/tags.vala:107
msgid "Set the longitude" msgid "Set the longitude"
msgstr "Define la longitud" msgstr "Define la longitud"
#: src/tags.vala:110 #: src/tags.vala:109
msgid "Shift the time in this amount of hours" msgid "Shift the time in this amount of hours"
msgstr "Desplaza el tiempo por esta cantidad de horas" msgstr "Desplaza el tiempo por esta cantidad de horas"
#: src/tags.vala:112 #: src/tags.vala:111
msgid "Resets the file timestamp to the photograph one" msgid "Resets the file timestamp to the photograph one"
msgstr "Reajusta la estampa de tiempo del archivo al de la fotografía" msgstr "Reajusta la estampa de tiempo del archivo al de la fotografía"
#: src/tags.vala:115 #: src/tags.vala:114
msgid "Prints the tags with format" msgid "Prints the tags with format"
msgstr "Imprime las etiquetas con formato" msgstr "Imprime las etiquetas con formato"
#: src/tags.vala:127 #: src/tags.vala:126
#, c-format #, c-format
msgid "No such file: ‘%s’\n" msgid "No such file: ‘%s’\n"
msgstr "No hay tal archivo: ‘%s’\n" msgstr "No hay tal archivo: ‘%s’\n"
#: src/tags.vala:134 #: src/tags.vala:133
#, c-format #, c-format
msgid "Error loading: ‘%s’\n" msgid "Error loading: ‘%s’\n"
msgstr "Error cargando: ‘%s’\n" msgstr "Error cargando: ‘%s’\n"
#: src/tags.vala:146 #: src/tags.vala:145
msgid "Title" msgid "Title"
msgstr "Título" msgstr "Título"
#: src/tags.vala:148 #: src/tags.vala:147
msgid "Album" msgid "Album"
msgstr "Álbum" msgstr "Álbum"
#: src/tags.vala:150 #: src/tags.vala:149
msgid "Comment" msgid "Comment"
msgstr "Comentario" msgstr "Comentario"
#: src/tags.vala:157 #: src/tags.vala:156
msgid "Date and time" msgid "Date and time"
msgstr "Fecha y hora" msgstr "Fecha y hora"
#: src/tags.vala:159 #: src/tags.vala:158
msgid "Orientation" msgid "Orientation"
msgstr "Orientación" msgstr "Orientación"
#: src/tags.vala:162 #: src/tags.vala:161
msgid "Latitude" msgid "Latitude"
msgstr "Latitud" msgstr "Latitud"
#: src/tags.vala:164 #: src/tags.vala:163
msgid "Longitude" msgid "Longitude"
msgstr "Longitud" msgstr "Longitud"
#: src/tags.vala:166 #: src/tags.vala:165
msgid "GPS tag" msgid "GPS tag"
msgstr "Etiqueta GPS" msgstr "Etiqueta GPS"
#: src/tags.vala:167 #: src/tags.vala:166
msgid "GPS version" msgid "GPS version"
msgstr "Versión GPS" msgstr "Versión GPS"
#: src/tags.vala:168 #: src/tags.vala:167
msgid "GPS datum" msgid "GPS datum"
msgstr "Dato GPS" msgstr "Dato GPS"
#: src/tags.vala:222 #: src/tags.vala:221
#, c-format #, c-format
msgid "Resetting time for %s...\n" msgid "Resetting time for %s\n"
msgstr "Reajustando tiempo para %s...\n" msgstr "Reajustando tiempo para %s\n"
#: src/tags.vala:230 #: src/tags.vala:229
#, c-format #, c-format
msgid "Shifting time for %s...\n" msgid "Shifting time for %s\n"
msgstr "Desplazando tiempo para %s...\n" msgstr "Desplazando tiempo para %s...\n"
#: src/tags.vala:262 #: src/tags.vala:261
#, c-format #, c-format
msgid "Updating %s...\n" msgid "Updating %s\n"
msgstr "Actualizando %s...\n" msgstr "Actualizando %s\n"
#: src/tags.vala:266 #: src/tags.vala:265
#, c-format #, c-format
msgid "%s updated.\n" msgid "%s updated.\n"
msgstr "% actualizado.\n" msgstr "% actualizado.\n"
#: src/tags.vala:281 #: src/tags.vala:280
#, c-format #, c-format
msgid "There was an error saving %s: %s\n" msgid "There was an error saving %s: %s\n"
msgstr "Hubo un error guardando %s: %s\n" msgstr "Hubo un error guardando %s: %s\n"
#: src/tags.vala:314 #: src/tags.vala:311
msgid "Missing files.\n" msgid "Missing files"
msgstr "Archivos faltantes.\n" msgstr "Archivos faltantes"
#: src/tags.vala:319 #: src/tags.vala:314
msgid "You cannot shift time and edit at the same time\n" msgid "You cannot shift time and edit tags"
msgstr "No puede desplazar tiempo y editar al mismo tiempo\n" msgstr "No puede desplazar tiempo y editar"
#: src/tags.vala:325 #: src/tags.vala:317
msgid "You cannot reset time and edit at the same time\n" msgid "You cannot reset time and edit tags"
msgstr "No puede desplazar tiempo y editar al mismo tiempo\n" msgstr "No puede desplazar tiempo y editar"
#: src/tags.vala:331 #: src/tags.vala:320
msgid "You cannot shift and reset time at the same time\n" msgid "You cannot shift and reset time"
msgstr "No puede desplazar tiempo y editar al mismo tiempo\n" msgstr "No puede desplazar tiempo y reajustar tiempo"
#: src/tags.vala:339 #: src/tags.vala:325
#, c-format #, c-format
msgid "Invalid orientation: %s\n" msgid "Invalid orientation: %s"
msgstr "Orientación inválida: %s\n" msgstr "Orientación inválida: %s"
#: src/tags.vala:351 #: src/tags.vala:335
#, c-format #, c-format
msgid "Invalid date and time: %s\n" msgid "Invalid date and time: %s"
msgstr "Fecha y tiempo inválidos: %s\n" msgstr "Fecha y tiempo inválidos: %s"
#: src/tags.vala:358 #: src/tags.vala:339
#, c-format #, c-format
msgid "Invalid timezone offset: %s\n" msgid "Invalid timezone offset: %s"
msgstr "Desplazamiento de zona de tiempo inválida: %s\n" msgstr "Desplazamiento de zona de tiempo inválida: %s"
#: src/tags.vala:364 #: src/tags.vala:343
#, c-format #, c-format
msgid "Invalid latitude: %s\n" msgid "Invalid latitude: %s"
msgstr "Latitud inválida: %s\n" msgstr "Latitud inválida: %s"
#: src/tags.vala:369 #: src/tags.vala:347
#, c-format #, c-format
msgid "Invalid longitude: %s\n" msgid "Invalid longitude: %s"
msgstr "Longitud inválida: %s\n" msgstr "Longitud inválida: %s"
#: src/tags.vala:375 #: src/tags.vala:351
msgid "Latitude will only be set on photos with GPS data\n" msgid "Latitude will only be set on photos with GPS data"
msgstr "La latitud sólo se definirá para fotografías con información GPS\n" msgstr "La latitud sólo se definirá para fotografías con información GPS"
#: src/tags.vala:380 #: src/tags.vala:354
msgid "Longitude will only be set on photos with GPS data\n" msgid "Longitude will only be set on photos with GPS data"
msgstr "La longitud sólo se definirá para fotografías con información GPS\n" msgstr "La longitud sólo se definirá para fotografías con información GPS"
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gqpe\n" "Project-Id-Version: gqpe\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-26 03:08-0600\n" "POT-Creation-Date: 2021-11-27 17:47-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -49,6 +49,14 @@ msgstr "" ...@@ -49,6 +49,14 @@ msgstr ""
msgid "Save picture" msgid "Save picture"
msgstr "" msgstr ""
#: data/application-window.ui:379
msgid "Open Google Maps on this location"
msgstr ""
#: data/application-window.ui:380
msgid "Google Maps"
msgstr ""
#: data/gqpe.desktop.in:3 #: data/gqpe.desktop.in:3
msgid "GQPE" msgid "GQPE"
msgstr "" msgstr ""
...@@ -65,80 +73,80 @@ msgstr "" ...@@ -65,80 +73,80 @@ msgstr ""
msgid "A Gtk+ based quick photo editor" msgid "A Gtk+ based quick photo editor"
msgstr "" msgstr ""
#: src/store.vala:52 #: src/store.vala:51
msgid "INPUTDIR OUTPUTDIR - Store images to a normalized location." msgid "INPUTDIR OUTPUTDIR - Store images to a normalized location."
msgstr "" msgstr ""
#: src/store.vala:58 #: src/store.vala:57
msgid "Use location look up" msgid "Use location look up"
msgstr "" msgstr ""
#: src/store.vala:60 #: src/store.vala:59
msgid "Update the metadata of the photograph" msgid "Update the metadata of the photograph"
msgstr "" msgstr ""
#: src/store.vala:62 src/tags.vala:117 #: src/store.vala:61 src/tags.vala:116
msgid "Be quiet" msgid "Be quiet"
msgstr "" msgstr ""
#: src/store.vala:86 #: src/store.vala:85
#, c-format #, c-format
msgid "Invalid city record: %s" msgid "Invalid city record: %s"
msgstr "" msgstr ""
#: src/store.vala:101 #: src/store.vala:100
#, c-format #, c-format
msgid "An error ocurred while parsing %s" msgid "An error ocurred while parsing %s"
msgstr "" msgstr ""
#: src/store.vala:104 #: src/store.vala:103
msgid "Cities database not found" msgid "Cities database not found"
msgstr "" msgstr ""
#. Translators: Month name and day #. Translators: Month name and day
#: src/store.vala:130 #: src/store.vala:129
#, c-format #, c-format
msgid "%s %d" msgid "%s %d"
msgstr "" msgstr ""
#: src/store.vala:133 #: src/store.vala:132
#, c-format #, c-format
msgid "%s, near %s" msgid "%s, near %s"
msgstr "" msgstr ""
#: src/store.vala:162 #: src/store.vala:161
#, c-format #, c-format
msgid "There was an error processing %s: %s. " msgid "There was an error processing %s: %s. "
msgstr "" msgstr ""
#: src/store.vala:164 #: src/store.vala:163
msgid "Skipping.\n" msgid "Skipping.\n"
msgstr "" msgstr ""
#: src/store.vala:239 src/tags.vala:308 #: src/store.vala:238 src/tags.vala:307
#, c-format #, c-format
msgid "Run ‘%s --help’ for a list of options.\n" msgid "Run ‘%s --help’ for a list of options"
msgstr "" msgstr ""
#: src/store.vala:246 #: src/store.vala:243
msgid "Exactly one output and one input directory needed.\n" msgid "Exactly one output and one input directory needed"
msgstr "" msgstr ""
#: src/store.vala:258 #: src/store.vala:252
#, c-format #, c-format
msgid "%s is not a directory\n" msgid "%s is not a directory\n"
msgstr "" msgstr ""
#: src/store.vala:265 #: src/store.vala:257
#, c-format #, c-format
msgid "There was an error while storing: %s\n" msgid "There was an error while storing: %s\n"
msgstr "" msgstr ""
#: src/tags.vala:66 #: src/tags.vala:65
msgid "[FILENAME…] - Edit and show the image tags." msgid "[FILENAME…] - Edit and show the image tags."
msgstr "" msgstr ""
#: src/tags.vala:71 #: src/tags.vala:70
msgid "" msgid ""
"With no flags the tags are printed. An empty string as parameter\n" "With no flags the tags are printed. An empty string as parameter\n"
"removes an individual tag.\n" "removes an individual tag.\n"
...@@ -158,170 +166,170 @@ msgid "" ...@@ -158,170 +166,170 @@ msgid ""
" %X: The longitude\n" " %X: The longitude\n"
msgstr "" msgstr ""
#: src/tags.vala:94 #: src/tags.vala:93
msgid "Set the title" msgid "Set the title"
msgstr "" msgstr ""
#: src/tags.vala:96 #: src/tags.vala:95
msgid "Set the comment" msgid "Set the comment"
msgstr "" msgstr ""
#: src/tags.vala:98 #: src/tags.vala:97
msgid "Set the album" msgid "Set the album"
msgstr "" msgstr ""
#: src/tags.vala:100 #: src/tags.vala:99
msgid "Set the date and time" msgid "Set the date and time"
msgstr "" msgstr ""
#: src/tags.vala:102 #: src/tags.vala:101
msgid "Set the timezone offset" msgid "Set the timezone offset"
msgstr "" msgstr ""
#: src/tags.vala:104 #: src/tags.vala:103
msgid "Set the orientation" msgid "Set the orientation"
msgstr "" msgstr ""
#: src/tags.vala:106 #: src/tags.vala:105
msgid "Set the latitude" msgid "Set the latitude"
msgstr "" msgstr ""
#: src/tags.vala:108 #: src/tags.vala:107
msgid "Set the longitude" msgid "Set the longitude"
msgstr "" msgstr ""
#: src/tags.vala:110 #: src/tags.vala:109
msgid "Shift the time in this amount of hours" msgid "Shift the time in this amount of hours"
msgstr "" msgstr ""
#: src/tags.vala:112 #: src/tags.vala:111
msgid "Resets the file timestamp to the photograph one" msgid "Resets the file timestamp to the photograph one"
msgstr "" msgstr ""
#: src/tags.vala:115 #: src/tags.vala:114
msgid "Prints the tags with format" msgid "Prints the tags with format"
msgstr "" msgstr ""
#: src/tags.vala:127 #: src/tags.vala:126
#, c-format #, c-format
msgid "No such file: ‘%s’\n" msgid "No such file: ‘%s’\n"
msgstr "" msgstr ""
#: src/tags.vala:134 #: src/tags.vala:133
#, c-format #, c-format
msgid "Error loading: ‘%s’\n" msgid "Error loading: ‘%s’\n"
msgstr "" msgstr ""
#: src/tags.vala:146 #: src/tags.vala:145
msgid "Title" msgid "Title"
msgstr "" msgstr ""
#: src/tags.vala:148 #: src/tags.vala:147
msgid "Album" msgid "Album"
msgstr "" msgstr ""
#: src/tags.vala:150 #: src/tags.vala:149
msgid "Comment" msgid "Comment"
msgstr "" msgstr ""
#: src/tags.vala:157 #: src/tags.vala:156
msgid "Date and time" msgid "Date and time"
msgstr "" msgstr ""
#: src/tags.vala:159 #: src/tags.vala:158
msgid "Orientation" msgid "Orientation"
msgstr "" msgstr ""
#: src/tags.vala:162 #: src/tags.vala:161
msgid "Latitude" msgid "Latitude"
msgstr "" msgstr ""
#: src/tags.vala:164 #: src/tags.vala:163
msgid "Longitude" msgid "Longitude"
msgstr "" msgstr ""
#: src/tags.vala:166 #: src/tags.vala:165
msgid "GPS tag" msgid "GPS tag"
msgstr "" msgstr ""
#: src/tags.vala:167 #: src/tags.vala:166
msgid "GPS version" msgid "GPS version"
msgstr "" msgstr ""
#: src/tags.vala:168 #: src/tags.vala:167
msgid "GPS datum" msgid "GPS datum"
msgstr "" msgstr ""
#: src/tags.vala:222 #: src/tags.vala:221
#, c-format #, c-format
msgid "Resetting time for %s...\n" msgid "Resetting time for %s\n"
msgstr "" msgstr ""
#: src/tags.vala:230 #: src/tags.vala:229
#, c-format #, c-format
msgid "Shifting time for %s...\n" msgid "Shifting time for %s\n"
msgstr "" msgstr ""
#: src/tags.vala:262 #: src/tags.vala:261
#, c-format #, c-format
msgid "Updating %s...\n" msgid "Updating %s\n"
msgstr "" msgstr ""
#: src/tags.vala:266 #: src/tags.vala:265
#, c-format #, c-format
msgid "%s updated.\n" msgid "%s updated.\n"
msgstr "" msgstr ""
#: src/tags.vala:281 #: src/tags.vala:280
#, c-format #, c-format
msgid "There was an error saving %s: %s\n" msgid "There was an error saving %s: %s\n"
msgstr "" msgstr ""
#: src/tags.vala:314 #: src/tags.vala:311
msgid "Missing files.\n" msgid "Missing files"
msgstr "" msgstr ""
#: src/tags.vala:319 #: src/tags.vala:314
msgid "You cannot shift time and edit at the same time\n" msgid "You cannot shift time and edit tags"
msgstr "" msgstr ""
#: src/tags.vala:325 #: src/tags.vala:317
msgid "You cannot reset time and edit at the same time\n" msgid "You cannot reset time and edit tags"
msgstr "" msgstr ""
#: src/tags.vala:331 #: src/tags.vala:320
msgid "You cannot shift and reset time at the same time\n" msgid "You cannot shift and reset time"
msgstr "" msgstr ""
#: src/tags.vala:339 #: src/tags.vala:325
#, c-format #, c-format
msgid "Invalid orientation: %s\n" msgid "Invalid orientation: %s"
msgstr "" msgstr ""
#: src/tags.vala:351 #: src/tags.vala:335
#, c-format #, c-format
msgid "Invalid date and time: %s\n" msgid "Invalid date and time: %s"
msgstr "" msgstr ""
#: src/tags.vala:358 #: src/tags.vala:339
#, c-format #, c-format
msgid "Invalid timezone offset: %s\n" msgid "Invalid timezone offset: %s"
msgstr "" msgstr ""
#: src/tags.vala:364 #: src/tags.vala:343
#, c-format #, c-format
msgid "Invalid latitude: %s\n" msgid "Invalid latitude: %s"
msgstr "" msgstr ""
#: src/tags.vala:369 #: src/tags.vala:347
#, c-format #, c-format
msgid "Invalid longitude: %s\n" msgid "Invalid longitude: %s"
msgstr "" msgstr ""
#: src/tags.vala:375 #: src/tags.vala:351
msgid "Latitude will only be set on photos with GPS data\n" msgid "Latitude will only be set on photos with GPS data"
msgstr "" msgstr ""
#: src/tags.vala:380 #: src/tags.vala:354
msgid "Longitude will only be set on photos with GPS data\n" msgid "Longitude will only be set on photos with GPS data"
msgstr "" msgstr ""
...@@ -374,10 +374,11 @@ namespace GQPE { ...@@ -374,10 +374,11 @@ namespace GQPE {
GLib.Idle.add(lazy_load); GLib.Idle.add(lazy_load);
} }
/* Loads the photographs lazily. */
private bool lazy_load() { private bool lazy_load() {
if (pmap.is_empty) { if (pmap.is_empty) {
progress_bar.visible = false; progress_bar.visible = false;
return false; return GLib.Source.REMOVE;
} }
var path = pmap.ascending_keys.first(); var path = pmap.ascending_keys.first();
var photo = pmap[path]; var photo = pmap[path];
...@@ -391,7 +392,7 @@ namespace GQPE { ...@@ -391,7 +392,7 @@ namespace GQPE {
pmap.unset(photo.path); pmap.unset(photo.path);
double t = photographs.size - pmap.size; double t = photographs.size - pmap.size;
progress_bar.fraction = t / photographs.size; progress_bar.fraction = t / photographs.size;
return true; return GLib.Source.CONTINUE;
} }
/* Initializes the iterators. */ /* Initializes the iterators. */
......
...@@ -51,6 +51,7 @@ namespace GQPE { ...@@ -51,6 +51,7 @@ namespace GQPE {
return options; return options;
} }
/* Copies the tags. */
private static void copy_tags() throws GLib.Error { private static void copy_tags() throws GLib.Error {
var i = new Photograph(GLib.File.new_for_commandline_arg(input)); var i = new Photograph(GLib.File.new_for_commandline_arg(input));
var o = new Photograph(GLib.File.new_for_commandline_arg(output)); var o = new Photograph(GLib.File.new_for_commandline_arg(output));
......
...@@ -51,7 +51,7 @@ namespace GQPE { ...@@ -51,7 +51,7 @@ namespace GQPE {
/*Loads the photos from the input directory. */ /*Loads the photos from the input directory. */
private static void load_photos() throws GLib.Error { private static void load_photos() throws GLib.Error {
stdout.printf(_("Loading photos...\n")); stdout.printf(_("Loading photos\n"));
int c = 0; int c = 0;
var root = GLib.File.new_for_path(input); var root = GLib.File.new_for_path(input);
Gee.ArrayQueue<File> queue = new Gee.ArrayQueue<File>(); Gee.ArrayQueue<File> queue = new Gee.ArrayQueue<File>();
...@@ -73,7 +73,7 @@ namespace GQPE { ...@@ -73,7 +73,7 @@ namespace GQPE {
try { try {
var photo = new Photograph(file); var photo = new Photograph(file);
photos.add(photo); photos.add(photo);
stderr.printf(_("Loaded %d photos... \r\b"), c++); stderr.printf(_("Loaded %d photos \r\b"), c++);
} catch (GLib.Error e) { } catch (GLib.Error e) {
var m = _("There was an error processing %s: %s. "); var m = _("There was an error processing %s: %s. ");
stderr.printf(m, path, e.message); stderr.printf(m, path, e.message);
...@@ -85,7 +85,7 @@ namespace GQPE { ...@@ -85,7 +85,7 @@ namespace GQPE {
photographs = new Photograph[photos.size]; photographs = new Photograph[photos.size];
foreach (var photo in photos) foreach (var photo in photos)
photographs[i++] = photo; photographs[i++] = photo;
stdout.printf(_("Loaded %d photos... \n"), c++); stdout.printf(_("Loaded %d photos \n"), c++);
} }
/* Recursively interpolates the coordinates for a range. */ /* Recursively interpolates the coordinates for a range. */
...@@ -127,7 +127,7 @@ namespace GQPE { ...@@ -127,7 +127,7 @@ namespace GQPE {
int c = 0; int c = 0;
for (int x = i+1; x < j; x++) { for (int x = i+1; x < j; x++) {
int y = (int)(((double)(x-i)) / n) + 1; int y = (int)(((double)(x-i)) / n) + 1;
stderr.printf(_("Updating %s...\n"), stderr.printf(_("Updating %s\n"),
photographs[x].path); photographs[x].path);
c++; c++;
photographs[x].set_coordinates(lats[y], lons[y]); photographs[x].set_coordinates(lats[y], lons[y]);
...@@ -196,14 +196,14 @@ namespace GQPE { ...@@ -196,14 +196,14 @@ namespace GQPE {
var file = GLib.File.new_for_path(args[i]); var file = GLib.File.new_for_path(args[i]);
try { try {
photographs[i-1] = new Photograph(file); photographs[i-1] = new Photograph(file);
stderr.printf(_("Loaded %d photos... \r\b"), c++); stderr.printf(_("Loaded %d photos \r\b"), c++);
} catch (GLib.Error e) { } catch (GLib.Error e) {
var m = _("There was an error processing %s: %s. "); var m = _("There was an error processing %s: %s. ");
stderr.printf(m, args[i], e.message); stderr.printf(m, args[i], e.message);
stderr.printf(_("Skipping.\n")); stderr.printf(_("Skipping.\n"));
} }
} }
stderr.printf(_("Loaded %d photos... \n"), c); stderr.printf(_("Loaded %d photos \n"), c);
int n = photographs.length; int n = photographs.length;
if (!photographs[0].has_geolocation || if (!photographs[0].has_geolocation ||
!photographs[n-1].has_geolocation) !photographs[n-1].has_geolocation)
......
...@@ -218,7 +218,7 @@ Format for printing: ...@@ -218,7 +218,7 @@ Format for printing:
var dt = Util.get_file_datetime(photo.path); var dt = Util.get_file_datetime(photo.path);
if (dt.compare(photo.datetime) == 0) if (dt.compare(photo.datetime) == 0)
continue; continue;
stderr.printf(_("Resetting time for %s...\n"), photo.path); stderr.printf(_("Resetting time for %s\n"), photo.path);
Util.set_file_datetime(photo.path, photo.datetime); Util.set_file_datetime(photo.path, photo.datetime);
} }
} }
...@@ -226,7 +226,7 @@ Format for printing: ...@@ -226,7 +226,7 @@ Format for printing:
/* Shifts time. */ /* Shifts time. */
private static void do_shift_time() { private static void do_shift_time() {
foreach (var photo in photos) { foreach (var photo in photos) {
stderr.printf(_("Shifting time for %s...\n"), photo.path); stderr.printf(_("Shifting time for %s\n"), photo.path);
photo.datetime = photo.datetime.add_hours(shift_time); photo.datetime = photo.datetime.add_hours(shift_time);
save(photo); save(photo);
} }
...@@ -258,7 +258,7 @@ Format for printing: ...@@ -258,7 +258,7 @@ Format for printing:
photo.set_coordinates(latitude, longitude); photo.set_coordinates(latitude, longitude);
} }
if (!quiet) if (!quiet)
stderr.printf(_("Updating %s...\n"), stderr.printf(_("Updating %s\n"),
GLib.Filename.display_basename(photo.path)); GLib.Filename.display_basename(photo.path));
save(photo); save(photo);
if (!quiet) if (!quiet)
......