Re: website translation experiments

2018-07-17 Thread Sergey Starosek
On Mon, Jul 16, 2018 at 3:31 AM Dirk Hohndel  wrote:

>
> If you have the time and want to help, respond here, tell us when you are
> happy with the translation (and what language) and I'll take the experiment
> from there. If you don't have a Transifex account, signing up is easy and
> then ask to join the subsurface team - I or one of the language
> coordinators will add you (there is a manual approval step involved -
> sorry).
>
> Done for ru_RU.

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Cylinder table header is not translated

2017-02-14 Thread Sergey Starosek
Hi,

Any idea why cylinder table header is not translated (log and planner)?
Translations are there. And weights table header is translated properly.

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: 4.6.1: translations and last minute fixes that are missing?

2017-02-12 Thread Sergey Starosek
(btw: I didn't get email about my own Transifex post - did the other people
> that are part of the Subsurface
> team on Transifex get a notification for that post?)
>

Got that one.

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: 4.6.1: translations and last minute fixes that are missing?

2017-02-12 Thread Sergey Starosek
Hi Dirk,

On Sat, Feb 11, 2017 at 7:42 AM, Dirk Hohndel  wrote:

> It turns out that there were six new strings. It would be great if those
> doing translations could spend a couple of minutes to translate those.
> I'm hoping to release 4.6.1 on Sunday.
>

Along with Transifex translations, I've created a pull request for russian
translation of the user manual.
Hope it's not too late.

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 2/2] Fix plurals translation

2015-10-30 Thread Sergey Starosek
Jan, Dirk,

On Fri, Oct 30, 2015 at 12:18 AM, Jan Mulder  wrote:

>
> with (after applying Sergey's patch 2/2) results exactly in the desired
> behaviour: 1 dive, 2 dives.
>
> The only thing I do not like is that Transiflex warns about different
> number of parenthesis between original and translation.
>

Warning regarding a number of parenthesis is due to '(s)' in original
string, which is missing on your translation.
And for these two strings with %n I can see additional tabs (one, few,
many, other) in Transifex UI. One need to fill all of them
to be able to save translation string.

I've just translated those with %n, updated local .ts file with 'tx pull'
and can see plurals being translated properly in ssrf.

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 2/2] Fix plurals translation

2015-10-30 Thread Sergey Starosek
Dirk,

On Thu, Oct 29, 2015 at 10:33 PM, Dirk Hohndel  wrote:

>
> The .ts file for those looks like this:
>
> 
> 
> , %n dive(s) here)
> 
> 
> 
> 
>
> 
> 
> (%n dive(s))
> 
> 
> 
> 
>
> and clearly transifex does not like this. Some googling seems to imply
> that transifex is aware of the bug and promised a fix more than a year ago
> (and then instead just shut down their forums - nice). But I also found a
> workaround and it appears to do the trick. Now I just need to remember to
> manually fix our .ts file before I send it - or somehow automate the
> workaround (which is to duplicate the "" line)
>

I've update translations/CMakeLists.txt to regenerate .ts files and after
build
I can see following for en_GB locale:



, %n dive(s) here)








For ru_RU locale there're three numerusform elements. Qt version 5.5.0.

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 2/2] Fix plurals translation

2015-10-30 Thread Sergey Starosek
Dirk,

On Fri, Oct 30, 2015 at 5:25 PM, Dirk Hohndel  wrote:

> > I can see following for en_GB locale:
> >
> > 
> > 
> > , %n dive(s) here)
> >
> >
> > 
> > 
> > 
> > 
> > 
> >
> > For ru_RU locale there're three numerusform elements. Qt version 5.5.0.
>
> So the question is do you see the two numerusform entries in
> translations/subsurface_source.ts
>
> I'm on Qt 5.5.1 and I only get one of those entries automatically created.
> If I then manually duplicate it before pushing to transifex then it seems
> to work.
>

No, I don't unless I set language in subsurface_source.ts to en_US:



Then there are multiple 'numerusform' elements for %n entries after
translations 'lupdate' (via make).

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 2/2] Fix plurals translation

2015-10-29 Thread Sergey Starosek
Dirk,

On Thu, Oct 29, 2015 at 6:34 PM, Dirk Hohndel  wrote:

> So we had a bunch of problems with the plural forms and just dropped them
> for 4.5
>
> Are these resolved?
>

I've spotted only two using 'git grep'. Likely this needs more thorough
search. And/or a kind of guidelines
for coders/translators.

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 2/2] Fix plurals translation

2015-10-29 Thread Sergey Starosek
On Thu, Oct 29, 2015 at 9:25 PM, Dirk Hohndel  wrote:

> > > So we had a bunch of problems with the plural forms and just dropped
> them
> > > for 4.5
> > >
> > > Are these resolved?
> > >
> >
> > I've spotted only two using 'git grep'. Likely this needs more thorough
> > search. And/or a kind of guidelines
> > for coders/translators.
>
> I seem to remember that the problem was that the translations didn't
> actually work correctly.
>
>
> https://www.mail-archive.com/subsurface@subsurface-divelog.org/msg06917.html
>
> So unless this has been resolved, I don't think this patch makes sense :-(
>

Tested locally with 'linguist' (not sure about transifex) against en-GB and
ru-RU locales. Works for me (c).
I.e. I get

   - 1 *дайв* for one dive in RU
   - 2-3-4 *дайва* for 2-4 dives
   - 5-... *дайвов* for more than four dives

One have to explicitly provide translations for singular (Rule 1), plural
(Rule 3) and dual (Rule 2 in case of 'ru' locale).
Also one have to translate plural forms in the base (en) locale and load it
explicitly in order to make plurals work.

What am I missing?

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH 1/2] Documentation: update russian translation of user manual to english eed9a4b0

2015-10-29 Thread sergey . starosek
From: Sergey Starosek <sergey.staro...@gmail.com>

Signed-off-by: Sergey Starosek <sergey.staro...@gmail.com>
---
 Documentation/user-manual_ru.txt | 71 +---
 1 file changed, 52 insertions(+), 19 deletions(-)

diff --git a/Documentation/user-manual_ru.txt b/Documentation/user-manual_ru.txt
index 9061dc0..59a0938 100644
--- a/Documentation/user-manual_ru.txt
+++ b/Documentation/user-manual_ru.txt
@@ -6,7 +6,7 @@
 // :revnumber: 4.5
 // :revdate: October 2015
 :icons:
-:toc:
+:toc2:
 :toc-placement: manual
 :numbered:
 :lang: ru
@@ -21,6 +21,7 @@ Linus Torvalds, Miika Turkia, Amit Chaudhuri, Jan Schubert, 
Salvador Cuñat, Ped
 
 [blue]#_Версия 4.5, Октябрь 2015_#
 
+
 Вас приветствует _Subsurface_, современная программа для ведения журнала
 погружений с возможностями организации, документирования, анализа и печати
 погружений для SCUBA и фридайверов. _Subsurface_ предлагает множество
@@ -64,14 +65,32 @@ _Subsurface_ и, если необходимо, зависимостей, опи
 
 toc::[]
 
-[[S_UserSurvey]]
+
 Работа с этим руководством
 --
 Если руководство открыто из _Subsurface_, то вы не увидите никаких элементов
-управления. Однако важная функция _поиска_ доступна по нажатию комбинации 
клавиш
-control-F или command-F. Используйте текстовое поле в нижней части экрана для 
поиска
-нужной информации в руководстве.
+управления. Однако вам доступны две удобных функции:
+
+- _ПОИСК_ активируется нажатием комбинации клавиш control-F или command-F.
+  Используйте текстовое поле в нижней части экрана для поиска нужной информации
+  в руководстве.  Справа от поля поиска кнопки с изображением стрелок вверх и
+  вниз позволяют перемещаться по результатам поиска.
+
+
+
+image::images/usermanualfunctions.jpg["Руководство 
пользователя",align="center"]
+
+
+- _ИСТОРИЯ ПЕРЕХОДОВ_. Как и в случае работы с веб-браузером, вы можете
+  переходить по ссылкам в руководстве. Контекстное меню (его вы можете вызвать
+  правым щелчком мыши) позволяет вам перемещаться по истории переходов вперед и
+  назад.
+
 
+
+
+
+[[S_UserSurvey]]
 Опрос пользователей
 ---
 Для того, чтобы _Subsurface_ удовлетворял всем потребностям наших 
пользователей,
@@ -513,7 +532,10 @@ _Subsurface_ должен обнаружить дайв-компьютер. В 
 показывается их название, адрес и статус сопряжения. Если устройство не
 сопряжено и подсвечено красным цветом, щелкните на нем правой кнопкой мыши и из
 контекстного меню выберите пункт _Сопряжение_. Дождитесь окончания этого
-действия.
+действия. Если сопряжение с этим устройством производится впервые, _Subsurface_
+может запросить пароль или PIN-код. Наиболее часто используется код  
(например,
+это работает с Shearwater Petrel). При необходимости обратитесь к руководству
+пользователя вашего дайв-компьютера.
 
 
 
@@ -545,9 +567,14 @@ Bluetooth-устройства будет закрыто. Теперь в окн
 = Windows
 image::images/DC_import_Bluetooth_Windows.png["Рисунок: Сопряжение устройств 
Bluetooth в Windows",align="center"]
 
-На платформе _Windows_ детали локального Bluetooth-адаптера не отображаются.
+На платформе _Windows_ детали локального Bluetooth-адаптера не отображаются 
как в
+случае Mac и Linux.
 Для успешного обнаружения дайв-компьютера убедитесь, что на вашем компьютере
 включен Bluetooth. Используйте кнопку _Сканировать_ для обнаружения устройств.
+Если сопряжение устройства производится впервые, вам возможно придется указать
+PIN-код. Обычно это ; при необходимости обратитесь к руководству 
пользователя
+вашего дайв-компьютера.
+
 
 Сопряжение устройств происходит автоматически при загрузке погружений. Если до
 этого устройства никогда не были сопряжены, операционная система запросит
@@ -558,10 +585,10 @@ _Загрузка из дайв-компьютера_ нажмите кнопк
 
 [icon="images/icons/important.png"]
 [IMPORTANT]
-Учтите, что в настоящий момент _Subsurface_ работает только с локальными 
Bluetooth-адаптерами,
-использующими стэк Microsoft Bluetooth. Прочие, использующие драйверы 
_Widcomm_,
-_Stonestreet One Bluetopia Bluetooth_ или _BlueSolei_, заведомо работать не 
будут.
-
+Учтите, что в настоящий момент _Subsurface_ работает только с локальными 
Bluetooth-адаптерами
+и Bluetooth-брелками, использующими стэк Microsoft Bluetooth (например, 
iSonic).
+Прочие, использующие драйверы _Widcomm_, _Stonestreet One Bluetopia Bluetooth_ 
или
+_BlueSolei_, заведомо работать не будут.
 
 
 Информационное сообщение в левой нижней части окна выбора Bluetooth-устройства
@@ -2195,7 +,10 @@ image::images/InfoBox2.jpg["Рисунок: Информационное окн
 возникновения декомпрессионных обязательств (т.е. пока не появится потолок).
 Как только NDL превышен и появляются декомпрессионные обязательства, TTS
 указывает время до всплытия на поверхность, включая время всплытия и
-декомпрессии.
+декомпрессии. TTS рассчитывается исходя и расхода (SAC) текущего газа, даже
+если на профиле указаны переходы на другие смеси.

[PATCH 2/2] Fix plurals translation

2015-10-29 Thread sergey . starosek
From: Sergey Starosek <sergey.staro...@gmail.com>

This allows separate translation of singular and plural forms

Signed-off-by: Sergey Starosek <sergey.staro...@gmail.com>
---
 qt-ui/modeldelegates.cpp |  2 +-
 qthelper.cpp | 11 ---
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp
index 7bdb699..881037a 100644
--- a/qt-ui/modeldelegates.cpp
+++ b/qt-ui/modeldelegates.cpp
@@ -543,7 +543,7 @@ void LocationFilterDelegate::paint(QPainter *painter, const 
QStyleOptionViewItem
QString distance = distance_string(distanceMeters);
int nr = nr_of_dives_at_dive_site(ds->uuid, false);
bottomText += tr(" (~%1 away").arg(distance);
-   bottomText += tr(", %1 dive(s) here)").arg(nr);
+   bottomText += tr(", %n dive(s) here)", "", nr);
}
}
if (bottomText.isEmpty()) {
diff --git a/qthelper.cpp b/qthelper.cpp
index 2f1f041..a12d253 100644
--- a/qthelper.cpp
+++ b/qthelper.cpp
@@ -1074,14 +1074,11 @@ QString get_trip_date_string(timestamp_t when, int nr, 
bool getday)
localTime.setTimeSpec(Qt::UTC);
QString ret ;
 
-   if (nr != 1) {
-   if (getday) {
-   ret = localTime.date().toString(dateFormat) + " " + 
QObject::tr("(%1 dives)").arg(nr);
-   } else {
-   ret = localTime.date().toString("MMM yy") + " " + 
QObject::tr("(%1 dives)").arg(nr);
-   }
+   QString suffix = " " + QObject::tr("(%n dive(s))", "", nr);
+   if (getday) {
+   ret = localTime.date().toString(dateFormat) + suffix;
} else {
-   ret = localTime.date().toString(dateFormat) + " " + 
QObject::tr("(1 dive)");
+   ret = localTime.date().toString("MMM yy") + suffix;
}
return ret;
 
-- 
1.9.1

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH 1/2] User manual tidy-up

2015-10-14 Thread sergey . starosek
From: Sergey Starosek <sergey.staro...@gmail.com>

Signed-off-by: Sergey Starosek <sergey.staro...@gmail.com>
---
 Documentation/user-manual.txt | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d216624..6c7d7f2 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1907,7 +1907,7 @@ toxicity units (OTU) incurred.
 Gas consumption and SAC calculations:
 _Subsurface_ calculates SAC and Gas consumption taking in account gas
 incompressibility, particularly at tank pressures above 200 bar, making them 
more accurate.
-Users should refer to xref:SAC_CALCULATION[Appendix D] for more information.
+Users should refer to xref:SAC_CALCULATION[Appendix F] for more information.
 
 [[S_ExtraDataTab]]
 === The *Extra Data* tab (usually for individual dives)
@@ -2504,7 +2504,7 @@ _Facebook_ connection.
 
 image::images/facebook1_f20.jpg["Figure: Facebook login",align="center"]
 
-From the _Subsurface_ window it is easy to determe whether _Subsurface_ has a 
valid connection to _Facebook_
+From the _Subsurface_ window it is easy to determine whether _Subsurface_ has 
a valid connection to _Facebook_
 From the *Main Menu*, select _Share on -> Facebook_ (image *A*, below). 
Normally, the _Facebook_ option is greyed out. But
 if there is a connection to _Facebook_, this option is active (i.e. in black 
colour and can be selected).
 
@@ -2835,7 +2835,7 @@ image::images/Pref1_f20.jpg["FIGURE: Preferences defaults 
page",align="center"]
 
   ** *Dives*: For the _Default Dive File_ one needs to specify the directory 
and
  file name of one's
- electronic dive log book. This is a file with filename extension of 
either _.xml_ or _ssrf_. When
+ electronic dive log book. This is a file with filename extension of 
either _.xml_ or _.ssrf_. When
  launched, _Subsurface_ will automatically load the specified dive log 
book. There are three options:
  - _No default file_: When checked, _Subsurface_ does not automatically 
load a dive log at startup.
  - _Local default file_: When checked, _Subsurface_ automatically loads a 
dive log from the local hard disk
@@ -3079,7 +3079,7 @@ image::images/PlannerWindow1_f20.jpg["FIGURE: Dive 
planner startup window",align
 
 - In the table labelled _Available Gases_, add the information of the 
cylinders to be used
   as well as the gas composition within that cylinder. This is done in a 
similar way as for
-  <<S_CylinderData,providing cylinder data for dive logs>>. Choose the 
cylinder type by
+  <<cylinder_definitions,providing cylinder data for dive logs>>. Choose the 
cylinder type by
   double clicking the cylinder type and using the dropdown list, then specify 
the work
   pressure of this cylinder. By leaving the oxygen concentration (O2%) filed 
empty,
   the cylinder is assumed to contain air. Otherwise enter the oxygen and/or 
helium
@@ -3136,7 +3136,7 @@ the nitrogen load incurred during previous dives.
 
 - Define the amount of gas that the cylinder must have at the end of the 
bottom section of the
   dive just before ascent. A value of 50 bar is often used. The reason for 
this reserve gas is to provide for the possible
-  need need to bring one's buddy to the surface using gas sharing. How much 
gas is used in
+  need to bring one's buddy to the surface using gas sharing. How much gas is 
used in
   sharing depends on the depth of the ascent. This can be a bit hard to 
estimate, so most agencies assume a
   fixed amount of gas, or actually of pressure e.g. 40 or 50 bar or 25% or 33% 
(rule of thirds). But _Subsurface_ can do better
   because it knows about the ascent and that is why we add the amount of gas 
during the ascent (i.e. the "deco gas“).
-- 
1.9.1

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH 2/2] Documentation: update russian translation of user manual

2015-10-14 Thread sergey . starosek
From: Sergey Starosek <sergey.staro...@gmail.com>

Signed-off-by: Sergey Starosek <sergey.staro...@gmail.com>
---
 Documentation/user-manual_ru.txt | 209 +++
 1 file changed, 125 insertions(+), 84 deletions(-)

diff --git a/Documentation/user-manual_ru.txt b/Documentation/user-manual_ru.txt
index f01145b..5c7dd3d 100644
--- a/Documentation/user-manual_ru.txt
+++ b/Documentation/user-manual_ru.txt
@@ -268,7 +268,7 @@ image::images/DiveProfile3_f20.jpg["Рисунок: Меню выбора газ
 
 После того, как профиль погружения был задан, необходимо указать 
дополнительные детали.
 Используйте для этого вкладки *Примечания* и *Снаряжение*, находящиеся в 
верхней левой
-части окна _Subsurface_. Перейдите по xref:S_Notes_dc[*этой ссылке*] для 
получения более
+части окна _Subsurface_. Перейдите по xref:S_Notes_dc[этой ссылке] для 
получения более
 подробной информации.
 
 
@@ -544,6 +544,7 @@ Bluetooth-устройства будет закрыто. Теперь в окн
 
 = Windows
 image::images/DC_import_Bluetooth_Windows.png["Рисунок: Сопряжение устройств 
Bluetooth в Windows",align="center"]
+
 На платформе _Windows_ детали локального Bluetooth-адаптера не отображаются.
 Для успешного обнаружения дайв-компьютера убедитесь, что на вашем компьютере
 включен Bluetooth. Используйте кнопку _Сканировать_ для обнаружения устройств.
@@ -644,15 +645,29 @@ image::images/AddDive3_f22.jpg["Рисунок: Вкладка Примечан
 
 
 
-*Местоположение*: В этом поле можно указать название дайв-сайта, например,
-«Эль-Мина рэк, Хургада, Египет». Управление дайв-сайтами осуществляется 
отдельно от ведения
-журнала. Если была указана информация для одного дайв-сайта, и у вас есть 
несколько погружений
+*Местоположение*:
+[icon="images/icons/warning2.png"]
+[WARNING]
+Управление дайв-сайтами выполняется отдельно от журнала погружений. Поэтому 
информация погружения
+на вкладках *Примечания* и *Снаряжение* не может быть отредактирована 
одновременно с данными
+дайв-сайта. Сохраните прочую информацию (партнеры, дайв-мастер, костюм) 
нажатием на кнопку
+*Применить изменения*. Только после этого укажите название местоположения в 
поле _Местоположение_.
+
+
+
+Укажите название дайв-сайта, например, «Эль-Мина рэк, Хургада, Египет».
+Если была указана информация для одного дайв-сайта, и у вас есть несколько 
погружений
 в этом же месте, то эта информация может быть использована без необходимости 
повторного ввода
 данных. Информация дайв-сайта может быть отредактирована в любой момент. Для 
этого выберите
 в списке любое погружение, выполнявшееся на этом сайте, и нажмите кнопку с 
изображением глобуса,
 которая находится справа от поля *Местоположение* (см. картинку справа выше). 
При вводе названия
 дайв-сайта _Subsurface_ автоматически предложит вам список сайтов с похожими 
именами. Если сайт
-уже существует, выберите его из списка.
+уже существует, выберите его из списка. Справа от названия сайта в выпадающем 
списке находится
+картинка либо с изображением глобуса (означает, что в базе данных _Subsurface_ 
есть погружения
+на этом сайте), либо со значком *+* (сайты с похожим названием, которые еще не 
были добавлены
+в базу сайтов).
+
+
 
 
 
@@ -662,7 +677,7 @@ image::images/AddDive3_f22.jpg["Рисунок: Вкладка Примечан
 
 image::images/Locations1_f22.jpg["FIGURE:Редактирование 
дайв-сайта",align="center"]
 
-Нажмите на иконку со знаком + справа. Вам будет представлена панель, на 
которой можно ввести
+Дважды щелкните мышью на наовом дайв-сайте. Вам будет представлена панель, на 
которой можно ввести
 координаты и прочую информацию о сайте (рисунок *В* выше). Наиболее важными 
являются географические
 координаты сайта. Их можно указать тремя способами:
 
@@ -671,8 +686,6 @@ _Subsurface_. На карте отображается оранжевая пол
 на карте двойным щелчком мыши». При двойном нажатии в соответствующем месте
 карты, оранжевая полоса исчезнет и координаты точки будут заполнены в поле.
 
-
-
 б. Координаты могут быть получены с помощью вспомогательного приложения
 _Subsurface_, если у вас есть устройство Android с GPS-датчиком и координаты
 дайв-сайта были сохранены в этом устройстве.  xref:S_Companion[Нажмите, чтобы
@@ -690,6 +703,9 @@ _Subsurface_, если у вас есть устройство Android с GPS-д
 например, -30.22496. Аналогично, долгота западного полушария указывается с 
буквой *З*,
 например, З07°, или со знаком минус, например,-7.34323. На некоторых 
клавиатурах отсутствует
 символ градусов ((°). Его можно заменить на *d*, например: С30d З20d.
+Если вы указали название дайв-сайта и его координаты, сохраните информацию, 
нажав на кнопку
+_Сохранить изменения_ в верхней части панели.
+
 
 *Важно* координаты GPS привязаны к названию дайв-сайта, поэтому
 указание координат для погружений, у которых не указано местоположение, может
@@ -697,6 +713,16 @@ _Subsurface_, если у вас есть устройство Android с GPS-д
 эти погружения были в одном месте и имеют одинаковые координаты).
 
 
+*

[PATCH] Add app icon to statistics window

2015-10-14 Thread sergey . starosek
From: Sergey Starosek <sergey.staro...@gmail.com>

Signed-off-by: Sergey Starosek <sergey.staro...@gmail.com>
---
 qt-ui/mainwindow.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index f9bfd77..d28c1c6 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -847,6 +847,7 @@ void MainWindow::on_actionYearlyStatistics_triggered()
d.setWindowFlags(Qt::Window | Qt::CustomizeWindowHint
| Qt::WindowCloseButtonHint | Qt::WindowTitleHint);
d.setWindowTitle(tr("Yearly statistics"));
+   d.setWindowIcon(QIcon(":/subsurface-icon"));
d.exec();
 }
 
-- 
1.9.1

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Fwd: User manual status

2015-10-13 Thread Sergey Starosek
Willem,

On Tue, Oct 13, 2015 at 2:36 PM, Willem Ferguson <
willemfergu...@zoology.up.ac.za> wrote:

> The user manual is, as far as I can see, ready for release with V4.5.
> There are a few small items but this will be followed up after the release.
>
>
One note on geo-lookup functionality. Upon performing lookup, name of the
found location does not populate Name field but instead Tags label (not
sure about the purpose of this one).

Sergey

P.S. Didn't see your patch "User manual update: Facebook"
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Fwd: User manual status

2015-10-13 Thread Sergey Starosek
Dirk,

On Tue, Oct 13, 2015 at 5:55 PM, Dirk Hohndel  wrote:

>
> > One note on geo-lookup functionality. Upon performing lookup, name of the
> > found location does not populate Name field but instead Tags label (not
> > sure about the purpose of this one).
>
> I'm not sure what you are asking :-)


Manual states the following:

If a name has been found, it is automatically inserted into the text box
titled *Location*.


Which seems to be misleading, because there's no such field in Dive Site
management dialog.
Should we extend user manual with what you described below? Thanks for the
explanation.

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Dive planner oddities

2015-10-12 Thread Sergey Starosek
Robert, Rick,

On Sun, Oct 11, 2015 at 10:44 PM, Rick Walsh  wrote:

> The cylinder pressure graph should start to flatten when starting ascent.
> Assuming a constant SAC, gas consumption varies with depth.  Is that what
> you're referring to?
>
See another image attached (rec model, 1 min descent to 30 min, 17 min at
30 m, SAC set to 17/15 l/min). See the pressure graph spike (in red circle).

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH] Fix crash on empty arguments

2015-10-12 Thread sergey . starosek
From: Sergey Starosek <sergey.staro...@gmail.com>

Signed-off-by: Sergey Starosek <sergey.staro...@gmail.com>
---
 main.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/main.cpp b/main.cpp
index 71a998d..d6bbbf2 100644
--- a/main.cpp
+++ b/main.cpp
@@ -39,6 +39,9 @@ int main(int argc, char **argv)
 
for (i = 1; i < arguments.length(); i++) {
QString a = arguments.at(i);
+   if (a.isEmpty()) {
+   continue;
+   }
if (a.at(0) == '-') {
parse_argument(a.toLocal8Bit().data());
continue;
-- 
1.9.1

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH] Fix crash on empty arguments

2015-10-12 Thread sergey . starosek
From: Sergey Starosek <sergey.staro...@gmail.com>

Signed-off-by: Sergey Starosek <sergey.staro...@gmail.com>
---
 main.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/main.cpp b/main.cpp
index 71a998d..f27a174 100644
--- a/main.cpp
+++ b/main.cpp
@@ -39,6 +39,8 @@ int main(int argc, char **argv)
 
for (i = 1; i < arguments.length(); i++) {
QString a = arguments.at(i);
+   if (a.isEmpty())
+   continue;
if (a.at(0) == '-') {
parse_argument(a.toLocal8Bit().data());
continue;
-- 
1.9.1

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Custom print template

2015-10-11 Thread Sergey Starosek
Hi all,

Previously there was an option ('Custom' item in the templates drop-down
list)
to create new print template. Now it has disappeared and the only way is to
export an existing one under different name, then import and edit it.

What's the right way of doing that?

Sergey

P.S. Current master bfaf57e1
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: crash on planning a dive with LANG=fi

2015-10-11 Thread Sergey Starosek
Dirk,

On Sun, Oct 11, 2015 at 9:14 PM, Dirk Hohndel <d...@hohndel.org> wrote:

> On Sun, Oct 11, 2015 at 09:10:40PM +0300, Sergey Starosek wrote:
>
> Thanks for testing. I fixed this in the Portuguese translation (and the
> two instances in the rather incomplete Hebrew translation). The new daily
> binaries are compiling... if you could update this in few minutes and
> retest that would be very welcome.
>
> Planner with PT and FI locales works for me. Can't test hebrew since SSRF
does not offer it in the locales list.

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Custom print template

2015-10-11 Thread Sergey Starosek
Lubomir, 11.10.2015, 20:55, "Lubomir I. Ivanov" :we decided to remove the editing logic behind the custom.html template.exporting then importing is a valid way of adding a new template. youcan also go to the folder and create files manually.Thanks for the explanation. Will wait for Willem's update to user manual and will update translation then. Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Dive planner oddities

2015-10-11 Thread Sergey Starosek
HI Robert,

Away from keyboard, answering from mobile.

On Oct 11, 2015 22:18, "Robert C. Helling"  wrote:
>
> Sergey,
>
> thanks for testing this. Unfortunately I think I need some more
explanation of your findigs.
>
> What exactly do you mean by „not aligned“? Do you refer to the fact that
the handle is not at the end of the 15m segment? That is on purpose, this
is what „recreational mode“ is about: The second handle is the last
manually entered waypoint and in recreational mode the planner stays at
that depth for the maximum time that does not get you in conflict with gas
usage and deco obligations.

Thanks for the explanation,  user manual needs to clarify on this,  I
think. Will do more testing on this tomorrow.

>> Note a peak on a SAC graph
>
> Maybe I am stupid but I cannot see it on your screen shots. Actually, I
don’t see the pO2 graph at all. When I run subsurface, I can see the graph
but no peak. Could you indicate on the screen shot where I am supposed to
look?

I was talking about  cylinder pressure graph (SAC is irrelevant here, just
color of the line). Look for the spike just around ascent beginning.

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


User manual notes

2015-10-09 Thread Sergey Starosek
Hi Willem,

Found several inconsistencies during translation:

   - line 547:
   On _Windows_ platforms the _Local Bluetooth device details section_ on
   the left is not displayed.

   Shouldn't it read "on the right" ?
   - line 2733:
   _Custom_: This option allows customisation of the print contents and
   layout.

   With the current master I can't see "Custom" option in the template list
   dropdown
   - line 3129: recreational dive planner sample
  - Screenshot needs to be updated. 1st segment duration is actually 1
  minute, not 2 minutes
  - If I set 2nd segment duration to 19 minutes, then NDL is violated
  (profile is red)
  - Dive plan details says nothing about buddy-sharing with regard to
  gas, but previous paragraph states that
   - line 3265:

   Section regarding planning of pSCR and CCR dives have been reordered.
   pSCR section refers to CCR section as "above" while it is actually below
   (two places there)

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH 2/3] User manual spelling fixes and tidy-up

2015-10-09 Thread sergey . starosek
From: Sergey Starosek <sergey.staro...@gmail.com>

Signed-off-by: Sergey Starosek <sergey.staro...@gmail.com>
---
 Documentation/user-manual.txt | 91 ++-
 1 file changed, 46 insertions(+), 45 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 1ac4d5f..9c27635 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1,4 +1,4 @@
-// Subsurface 4.5 User Manual
+// Subsurface 4.5 User Manual
 // ==
 // :author: Manual authors: Jacco van Koll, Dirk Hohndel, Reinout Hoornweg,
 // Linus Torvalds, Miika Turkia, Amit Chaudhuri, Jan Schubert, Willem
@@ -392,8 +392,8 @@ of the dive computer (at least for those not charging while 
connected via USB).
After the dives have been downloaded, they appear in a tabular format on 
the righthand
side of the dialogue (see image *B*, above). Each dive comprises a row in 
the table, with the date, duration
and depth shown. Next to each dive is a checkbox: check all the dives that 
need to
-   be transfered to the *Dive List*. In the case of the image above, the last 
six dives are
-   checked and will be transfered to the *Dive List*. Then
+   be transferred to the *Dive List*. In the case of the image above, the last 
six dives are
+   checked and will be transferred to the *Dive List*. Then
click the _OK_ button at the bottom of the dialogue. All the imported dives 
appear
in the *Dive List*, sorted by date and time. Disconnect and
switch off the dive
@@ -402,7 +402,7 @@ of the dive computer (at least for those not charging while 
connected via USB).
 
 
 After this has been completed, select the OK button.
-The checked dives are transfered to the *Dive List*.
+The checked dives are transferred to the *Dive List*.
 
  - If there is a problem in communicating with the dive computer, an error
message will be shown, similar to this text: "Unable to open /dev/ttyUSB0 
Mares
@@ -512,7 +512,7 @@ the _Clear_ button and then scan again for Bluetooth 
devices using the _Scan_
 button. After performing these actions _Subsurface_ should see the dive 
computer.
 The label of the discovered dive computer contains the name of the device, its
 address and its pairing status. If the device is not paired and has a red
-background color, a context menu can be opened by selecting the item with a
+background colour, a context menu can be opened by selecting the item with a
 right-click.
 Select the the _Pair_ option and wait for the task to complete.
 
@@ -521,7 +521,7 @@ Select the the _Pair_ option and wait for the task to 
complete.
 [IMPORTANT]
 Currently _Subsurface_ does not support Bluetooth pairing with dive
 computers that require a custom PIN code. In order to pair the devices, use 
other
-OS utility\ies as suggested below.
+OS utilities as suggested below.
 
 One way to achieve this is to use +bluetoothctl+:
 
@@ -615,7 +615,7 @@ below is virtually identical for hand-entered dives and for 
dives downloaded fro
 
 In some cases,
 one has to provide the date and time of the dive, e.g. when entering a dive by 
hand or when a
-dive computer does not privide the date and time of the dive.
+dive computer does not provide the date and time of the dive.
 (Usually the date and time of the dive, gas mixture and water temperature are
 shown as obtained from the dive computer)
 If the contents of the *Notes tab* is changed or edited in any way, the 
message in a blue box at
@@ -646,12 +646,12 @@ be used).
 
 *Location*: Here the name of the dive site can be entered, e.g. "Tihany, Lake
 Balaton, Hungary". Dive locations are managed as a separate part of the dive 
log.
-After entering the information for a particilar dive site, and several dives 
are
+After entering the information for a particular dive site, and several dives 
are
 performed at the same location, the information is re-used without requiring
 full dive site information again. Existing dive location information
 can be edited at any time by selecting (on the *Dive List* panel) a dive 
performed at that site
 and by opening the location information by clicking the globe button on the
-right of the location name (see image on the righ, above). When entering a 
dive location name, auto location of
+right of the location name (see image on the right, above). When entering a 
dive location name, auto location of
 dive site names makes it easy to select a dive site that already exists in the 
dive log
 (i.e. when typing the name of a dive site,
 a dropdown list appears showing all sites with similar names). If the dive
@@ -1327,7 +1327,7 @@ After a dive trip using the Companion App, all dive 
locations are ready to be
 downloaded to a _Subsurface_ dive log (see below).
 
 
-= Settings on the Companion app
+= Settings on the Companion App
 
 Selecting the _Settings_ menu option results in the right hand image above 
(*B*).
 
@@ -1341,7 +1341,7 

[PATCH 3/3] Remove UTF BOM from user manual files

2015-10-09 Thread sergey . starosek
From: Sergey Starosek <sergey.staro...@gmail.com>

Signed-off-by: Sergey Starosek <sergey.staro...@gmail.com>
---
 Documentation/user-manual.txt| 2 +-
 Documentation/user-manual_ru.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 9c27635..f86b92e 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1,4 +1,4 @@
-// Subsurface 4.5 User Manual
+// Subsurface 4.5 User Manual
 // ==
 // :author: Manual authors: Jacco van Koll, Dirk Hohndel, Reinout Hoornweg,
 // Linus Torvalds, Miika Turkia, Amit Chaudhuri, Jan Schubert, Willem
diff --git a/Documentation/user-manual_ru.txt b/Documentation/user-manual_ru.txt
index 68c0ad9..ee98c9d 100644
--- a/Documentation/user-manual_ru.txt
+++ b/Documentation/user-manual_ru.txt
@@ -1,4 +1,4 @@
-// Subsurface 4.5 User Manual
+// Subsurface 4.5 User Manual
 // ==
 // :author: Manual authors: Jacco van Koll, Dirk Hohndel, Reinout Hoornweg,
 // Linus Torvalds, Miika Turkia, Amit Chaudhuri, Jan Schubert, Willem
-- 
1.9.1

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: updates towards 4.5

2015-10-07 Thread Sergey Starosek
Dirk, 07.10.2015, 11:55, "Dirk Hohndel" :Translations are looking good. Obviously Willem's changes will triggersubsequent changes to the translated manuals. Sadly, the Russiantranslation of the manual hasn't been updated at all - Sergey, should wedrop this? I know this is an insane amount of work...I'm in progress with this, hope to finish till the end of this week.Strings translation is finished already. Sergey 
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Garbage on a world map

2015-02-14 Thread Sergey Starosek
With the latest master changes

- start ssrf
- close logbook (Ctrl-W)
- all dive sites disappear from the world map but the last active is still 
there with the garbage on a label (see screenshot)

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


SIGABORT in dive site manager

2015-02-14 Thread Sergey Starosek
- Enter dive site manager UI by selecting dive with location
- Close current logbook (Ctrl-W)
- Press 'Apply changes' button in dive site manager

*** Error in `/home/star/src/subsurface/subsurface': double free or corruption 
(out): 0x00dc7150 ***

Program received signal SIGABRT, Aborted.
0x739a3cc9 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x739a3cc9 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x739a70d8 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x739e0f24 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x739ed1fe in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x004e3520 in LocationInformationWidget::acceptChanges() ()
#5  0x747ea2a6 in QMetaObject::activate(QObject*, int, int, void**) () 
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x758cba52 in QAction::triggered(bool) () from 
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7  0x758cdf38 in QAction::activate(QAction::ActionEvent) () from 
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x759c9bed in ?? () from 
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x759c9d24 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () 
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH] Fix Atomic logo in user manual

2015-02-10 Thread Sergey Starosek


0001-Add-missing-Atomic-Aquatics-logo.patch
Description: Binary data
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Mean depth units bug

2015-01-31 Thread Sergey Starosek
Seems there's a bug with mean depth units on a profile graph. It takes only 
first byte to display which fails for multi-byte encodings.
This is happens somewhere at DiveMeanDepthItem::createTextItem() 
(diveprofileitem.cpp:625) but I don't know how to fix this. 

Hope someone will take care of that.

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Mean depth units bug

2015-01-31 Thread Sergey Starosek
31.01.2015, 20:29, Lubomir I. Ivanov neolit...@gmail.com:
 On 31 January 2015 at 19:21, Sergey Starosek sergey-staro...@yandex.ru 
 wrote:
  Seems there's a bug with mean depth units on a profile graph. It takes only 
 first byte to display which fails for multi-byte encodings.
  This is happens somewhere at DiveMeanDepthItem::createTextItem() 
 (diveprofileitem.cpp:625) but I don't know how to fix this.

 strange, it doesn't happen for me (if i understand correctly what you
 describe); can you post a screenshot?

Mean depth units should read there as cyrillic 'м', but it shows 
first byte which is 0xD0 in UTF-8 I guess.

Sergey___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Segfault after export to DiveShare

2015-01-30 Thread Sergey Starosek
Steps to reproduce:

- start subsurface
- select one dive and export it to DiveShare
- close Subsurface

Program received signal SIGSEGV, Segmentation fault.
0x01810b80 in ?? ()
(gdb) bt
#0  0x01810b80 in ?? ()
#1  0x0056a464 in DiveShareExportDialog::~DiveShareExportDialog() ()
#2  0x0056a489 in DiveShareExportDialog::~DiveShareExportDialog() ()
#3  0x747eac9c in QObjectPrivate::deleteChildren() () from 
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x7590abf9 in QWidget::~QWidget() () from 
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5  0x004bbe29 in MainWindow::~MainWindow() ()
#6  0x00472e26 in exit_ui() ()
#7  0x004391a9 in main ()

Sergey
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface