aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-02-13Rewriting the error handling in planner.cGravatar Dirk Hohndel
Printf is not a way to issue warnings and errors. This is a very late addition but seems necessary for a viable release of the planner. This also adds one artificial limit and two warnings: a) no dives deeper than 400m b) warning of potentially very long calculation times for dives longer than 3h (180min) before the ascent and dives deeper than 150m It also creates quite a number of new strings that need to be translated (and marks a few existing ones for translation as well). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-13Fix msgfmt error on po/FR.poGravatar Miika Turkia
po/fr_FR.po:316: `msgid' and `msgstr' entries do not both end with '\n' msgfmt: found 1 fatal error Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-13Update french translation for release 3.0.0Gravatar Pierre-Yves Chibon
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr> Signed-off-by: Kévin Raymond <shaiton@fedoraproject.org> Signed-off-by: Jean-Noel Rouchon <jnoel@sissiou.net> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-13Small update to README and add preliminary ReleaseNotesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-12Remove rounded O2 in airGravatar Dirk Hohndel
To quote Linus, gentle as always: Stuff like this is just BS. Don't do it. You already fixed the bug with matching gas change events, so adding this idiotic workaround no longer fixes anything, and its confusing and actively misleading. It's not even percent. It's still permille, just rounded. So it's a nonsensical number and a misleading name. Just delete it as the abortion it is. It is only going to cause more problems later. Just use the correct value. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-12fi_FI translationGravatar Miika Turkia
On Tue, Feb 12, 2013 at 9:54 PM, Linus Torvalds <torvalds@linux-foundation.org> wrote: > 2013/2/12 Miika Turkia <miika.turkia@gmail.com>: >> There are a few words that should still be translated properly. I just don't >> know what would be proper translation for them. >> msgid "membrane" >> msgid "Bailing out to OC" >> msgid "CC SetPoint" > > From the Suunto DX Finnish manual at > > http://ns.suunto.com/Manuals/DX/Userguides/Suunto_DX_UserGuide_FI.pdf > > you can see some of the terms at least Suunto uses for CC/OC (closed > circuit and open circuit) (and suunto more commonly uses CCR: Closed > Circuit Rebreather instead of just CC). They talk about bailing out to > OC on page 100: "... suljetun kierron sukellus muuttuu avoimen kierron > sukellukseksi. Tämä ominaisuus on käyttökelpoinen > pelastautumistilanteessa." But I have no idea how to phrase that > "Bailing out to OC". For "SetPoint" they use "asetuspiste" (see a page > earlier). > > "membrane" is the crazy Uemis suit-thickness selection. Which would be > about a trilam drysuit with no inherent insulation in itself. I > suspect the best you can do is "laminaatti", because from looking > around, I can't find anything better. Sure, it's about the material > itself rather than the thinness, but whatever. It doesn't really > matter. Thanks, the attached patch should now be close enough to proper translation for these terms. Understanding (more or less) what the terms mean is a lot easier than actually translating them... miika From 96cf543e7464e72212ab26c965f1e8844da5d7b3 Mon Sep 17 00:00:00 2001 From: Miika Turkia <miika.turkia@gmail.com> Date: Wed, 13 Feb 2013 06:32:13 +0200 Subject: [PATCH] Tuning up fi_FI translation Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-12Fix gas handling in plannerGravatar Dirk Hohndel
Two separate bugs. a) Air cylinders were created with o2=209 and no other value set. sanitize_gasmix() turned that into o2=0 which meant that this cylinder was now identified as "nodata", i.e., unset. We now set a fake cylinder name to deal with that issue. b) the gaschange event is inherited from libdivecomputer and therefore only supports 1 percent granularity for o2 and h2. Since we didn't round when assigning the value we ended up with air being stored as o2=20 he=0 which of course then didn't match air anymore (which we have defined as 208 <= o2 <= 210). We now use o2=210 for air in the planner and carefully round the permille values whenever we convert into percent - and compare gases with percent granularity as well. A better fix for b) would be to change the Subsurface event to not simply copy the libdivecomputer behavior and use percent granularity but support permille instead. But this closely before the 3.0 release that seemed like a far too invasive change to make - the changes to the planner should have no impact outside the planner module. Reported-by: Chris Lewis <chrislewis915@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-12Set maxdepth correctly for dives with no samplesGravatar Dirk Hohndel
This showed up when suddenly some of the test dives no longer got merged when loaded twice. As I moved maxdepth up into the dive structure and added the code to fixup the data from what is in the divecomputer I missed the part where the function is exited early if there are no samples. This patch corrects that oversight. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-12fi_FI translationGravatar Miika Turkia
There are a few words that should still be translated properly. I just don't know what would be proper translation for them. msgid "membrane" msgid "Bailing out to OC" msgid "CC SetPoint" Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-12Small update to German translation plus attempt to update Swiss-GermanGravatar Dirk Hohndel
Since Swiss-German is based on the German translation I attempted to bring many of the improvements from there to the Swiss-German translation as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-12Update to DE translationGravatar Robert C. Helling
Some typos, some hyphens, some changes to more idiomatic expressions. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-12Updated Swedish translation.Gravatar Fredrik Steen
Updated swedish translation. Signed-off-by: Fredrik Steen <fredrik@ppo2.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-12Update to Dutch translationGravatar Reinout Hoornweg
Added translation for "Use right click to mark dive location at cursor". Signed-off-by: Reinout Hoornweg <reinout@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-12Let's do another Norwegian translation update for 3.0Gravatar Henrik Brautaset Aronsen
Added one string, improved some of the others after inspecting the source code locations. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-12Include SDE files on file selectorGravatar Miika Turkia
Include SDE files on the file selectors if zip support is enabled. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-12Add libzip to MacPorts dependenciesGravatar Henrik Brautaset Aronsen
This adds support for SDE imports. The website documentation should be updated as well. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-12Updated bg_BG translationGravatar Lubomir I. Ivanov
+ new string for map widget + fixed missing dot after shortened word Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-12Updated Russian translation for latest stringsGravatar Sergey Starosek
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-12Finished and fixed sk_SkGravatar Jozef Ivanecký
Signed-Off-By: Jozef Ivanecký <dodo.sk@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-11Update German and Swiss-German translations for latest stringsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-11Another strings updateGravatar Dirk Hohndel
This should re-enable to text for "Gas Used" and introduces the new text for the map window title from commit 21401578c620 ("Add instructions to GPS map window title"). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-11Add instructions to GPS map window titleGravatar Dirk Hohndel
This is not what I really wanted (which was the ability to add text to the map itself), but it should be at least somewhat better than what we have today (which is a complete lack of instructions). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-11print.c: Attempt a gettext() fix when printing translated "Gas Used"Gravatar Lubomir I. Ivanov
print_tanks(): It seems the macro call NC_("Amount","Gas Used") generates an entry in the .po file that then isn't matched at run time, which makes the bg_BG print have "Gas Used" in english instead of the translated text (which is already present in other places). On the other hand if we use N_ here (only mark it), the printed text is translated correctly. [Dirk Hohndel: added GETTEXT comment in code and rephrased commit message] Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-11print.c: Fix more buffer lengthsGravatar Lubomir I. Ivanov
print.c has a lot of defined buffer sizes, which do not consider UTF-8 expansion. gettext() with UTF-8 can inflate a string up to 2x the length (with 2byte characters). So if you set a buffer with length, say 20 bytes, lets see what happens: divenr[20]; snprintf(divenr, sizeof(divenr), _("Dive #%d - "), dive->number); But wait, in Russian "Dive" (which in latin text is "Pogrugenie") ends up with 10 cyrilic characters (20 bytes), so there is already buffer overflow here and snprintf() kicks in to corrupt the string. In matters of truncation snprintf() isn't UTF-8 safe. So if the buffer size happens to be less of the requested string to be put in there, the truncation can corrupt a trailing unicode character. For now, lets try fixing these by expanding the buffer sizes. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-11bg_BG.po: Small reformating of a (Dive# - data, time) string for print.cGravatar Lubomir I. Ivanov
In printed dives (6x per page) the <Dive # - data, time> string had an extra comma after the hyphen. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-11New translations and several bug fixes for Russian.Gravatar Sergey Starosek
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-10Remove "target ring" in map displayGravatar Dirk Hohndel
This could easily lead to confusion that this is where a dive spot would be marked (instead of the location of the mouse during right click). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-10Fix saving of changed GPS entryGravatar Linus Torvalds
We can't use gps_changed() in the gps_map_callback function, because that will actually change the GPS data in the dive being edited, which in turn will then cause us to later (when we *really* want to change it) not match the master dive data any more, and think we shouldn't edit the dive at all. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-10Fix rounding of GPS coordinatesGravatar Linus Torvalds
The whole "+ 0.5" to round to integers only works for positive values, and GPS coordinates are signed. So use the proper "round to int" function (rint()), which does this correctly. Also, remove the redundant check against the master gps values: we already checked that if we do have a master dive, the gps values must match the currently edited dive, so comparing against the master is entirely redundant. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-10[PATCH] Print.c: Modify for using pango_layout_get_extentsGravatar Salvador Cuñat
Modify for use said pango function, suposes changing the way of doing things: Before this we were moving along the cr (cairo object) and creating and closing a layout for each line we printed. To use this func we need to create a layout (say for tanks), and then we move along the layout getting the distance with the get_extents func. As the layout is set and passed to the auxiliary functions there's no need to pass some values we were passing. Clean a bit the positioning of SAC, CNS and OTU which were out of the scope of the change. Changes to draw_table() are wider and unclear as we have to change from a fixed number of dives (25 actually) to a variable one. Not patched still. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-10Updates on Finnish translationGravatar Miika Turkia
A couple of bug fixes and new translations. I also took the fuzzy marking from strings that look like proper translations. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09The print header should read DurationGravatar Miika Turkia
The context for this text is Duration, not Time. The translation for string Time was impossible when considering that on one location it was used to mean 'duration' and on the other it meant 'time'. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Updated bg_BG translation for 3.0Gravatar Lubomir I. Ivanov
- Added translations for pretty much everything new since the last iteration - Removed most usages of tags where both words begin with upper case letters. For example, "Some Tag" may look OK in English, but not so good in other languages. It's much better to have it as "Some tag" in Bulgarian. - Reverted some of the made-up abbreviations (such as the one for SAC) to the default English ones (i.e. just SAC). I'm not exactly sure those made any sense at all, so lets have them in English, as a little precaution. Hopefully enough for the 10-15 (in total) Bulgarian diving nerds out there. :) Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Make map dot more visibleGravatar Henrik Brautaset Aronsen
The OSM_GPS_MAP_SOURCE_VIRTUAL_EARTH_HYBRID shows cities as red dots in a couple of the zoom levels. Make the dive dots larger and yellow to make them stand out. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Fix up Swedish translation for recent po changesGravatar Linus Torvalds
Minimal fixups just to make things happier. Fredrik will hopefully double-check and fix this up further, but at least we have *some* string for the planning warning etc. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Switch to satellite image map providerGravatar Henrik Brautaset Aronsen
The current google map provider doesn't show coast lines properly and a lot of islands aren't shown at all. OSM_GPS_MAP_SOURCE_VIRTUAL_EARTH_HYBRID is much better IMHO. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Updates to Dutch translationGravatar Reinout Hoornweg
Translated some new strings. Fixed a typo in one of my earlier translations Signed-off-by: Reinout Hoornweg <reinout@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Replace deprecated gdk_pixbuf_unref with g_object_unrefGravatar Dirk Hohndel
This appears to be the better API call to do this (according to online documentation and compiler warnings on Linux). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09gps.c: Make two more memory leak fixes and a small coding style changeGravatar Lubomir I. Ivanov
1) add_gps_point(): Apparently osm_gps_map_point_new_*() is leaking memory if the point struct is not freed after the point is added to the map osm_gps_map_track_add_point(). However the API for releasing a point is missing on older Windows builds of the map library, so instead of osm_gps_map_point_free() we simply call: free((void *)point); 2) init_map() According to memory management tools osm_gps_map_get_default_cache_directory() is using g_realloc for eventual string expansion therefore we have to release at the returned pointer. 3) add_gps_point() Also a small coding style change is made: move the pointer symbol (*) near the name of the variable instead of leaving spaces on both sides, like: <type> * <name> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> ... Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09gps.c: Use only one instance of the map object and windowGravatar Lubomir I. Ivanov
Both show_gps_locations() and show_gps_location() have static local variables 'map' (OSM_TYPE_GPS_MAP) and 'window', so technically both would create their own instances of these objects. This patch promotes the two variables to global, so that only one instance per type ever exists. A memory leak that is addressed is at the flag pixbuf allocation, which has to be freed right after the image is added to the map: picture = gdk_pixbuf_from_pixdata(&flag_pixbuf, TRUE, NULL); ... gdk_pixbuf_unref(picture); There is also a heap-lifespan memory leak at: map = g_object_new(OSM_TYPE_GPS_MAP,... but GLib isn't exacly happy about us unrefing it right before exiting the GTK main loop, so no fix is provided for that unfortunately. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Fixed a memory leak related to the satelite iconGravatar Lubomir I. Ivanov
divelist.c:get_gps_icon_for_dive() In all callers of the function use gdk_pixbuf_unref() to release the returned GdkPixbuf (but also check for NULL). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Fixed some memory leaks in divelist.c related to gtk_tree_iter_copy()Gravatar Lubomir I. Ivanov
divelist.c: get_iter_from_idx() goes trought the tree model and calls iter_has_index(), until a match is found. when the match is found we use gtk_tree_iter_copy() to make a copy of the iterator. This means that the caller of get_iter_from_idx() has to take care the de-allocation using gtk_tree_iter_free(). Also take care of the eventual: parent = gtk_tree_iter_copy(...) allocation in select_prev_dive(), select_next_dive() Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Fixed a memory leak in webservice.cGravatar Lubomir I. Ivanov
webservice.c:webservice_download_dialog() If a value for previous UID is returned from the user config via subsurface_get_conf("webservice_uid"), make sure to free the string near the function return. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Fixed some memory leaks in windows.c and main.cGravatar Lubomir I. Ivanov
windows.c:subsurface_gettext_domainpath(): - memory at pointer returned from g_win32_getlocale() should be released main.c:setup_system_prefs() - it seems all calls to <os_file>:system_default_filename() return a pre-allocated buffer, therefore we don't need to call strdup() on the result itself. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Probably the final Norwegian PO-file update before 3.0Gravatar Henrik Brautaset Aronsen
Yeah, right :) Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Updated Swiss German translationGravatar Dirk Hohndel
Just to show the advantage of running make prepare-po-files before submitting a patch. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09New Makefile target to create smaller diffs for translationsGravatar Dirk Hohndel
Simply run make prepare-po-files and msgcat will be run over all po files to create consistent location references. That plus the change I made earlier to how we update the po files should create much smaller and easier to read diffs for translators. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Updated German translationGravatar Dirk Hohndel
This translation update was done with poedit which usually creates hugh amounts of noise because of the different format of text location references. By post-processing the file with msgcat --no-wrap po/de_DE.po -o po/de_DE.po the diff becomes MUCH smaller and much easier to read... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Hopefully last change to po filesGravatar Dirk Hohndel
While this is a pain for everyone, I decided not to edit out the code reference noise - after all this is supposed to help translators find where the text is used in case it's unclear how to translate something. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Small update to German translationGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>