[Freeciv-Dev] [bug #24391] C-formated string haven't enough following parameters

2016-02-09 Thread Konstantin Vedeneev
Follow-up Comment #2, bug #24391 (project freeciv):

Ok, I see the logic.

Trying to be more informative:

(file #26673)
___

Additional Item Attachment:

File name: SrvEdit2.patch Size:0 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24391] C-formated string haven't enough following parameters

2016-02-06 Thread Konstantin Vedeneev
URL:
  

 Summary: C-formated string haven't enough following
parameters
 Project: Freeciv
Submitted by: konved
Submitted on: Sat 06 Feb 2016 11:40:33 PM UTC
Category: general
Severity: 4 - Important
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 2.6, 3.0
 Discussion Lock: Any
Operating System: Any
 Planned Release: 

___

Details:

Fix.



___

File Attachments:


---
Date: Sat 06 Feb 2016 11:40:33 PM UTC  Name: SrvEdit.patch  Size: 851B   By:
konved



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #6908] Some corrections to translatable strings

2016-02-04 Thread Konstantin Vedeneev
URL:
  

 Summary: Some corrections to translatable strings
 Project: Freeciv
Submitted by: konved
Submitted on: Чт 04 фев 2016 12:50:21
Category: general
Priority: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 

___

Details:

Some string corrections (pluralization, qualification, typos).

Three patches for 2.5 (2.5.4?), 2.6 and trunk.



___

File Attachments:


---
Date: Чт 04 фев 2016 12:50:21  Name: MsgidAdj25.diff  Size: 3kB   By:
konved


---
Date: Чт 04 фев 2016 12:50:21  Name: MsgidAdj26.diff  Size: 5kB   By:
konved


---
Date: Чт 04 фев 2016 12:50:21  Name: MsgidAdj30.diff  Size: 5kB   By:
konved



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24385] Some pluralization missed

2016-02-04 Thread Konstantin Vedeneev
URL:
  

 Summary: Some pluralization missed
 Project: Freeciv
Submitted by: konved
Submitted on: Чт 04 фев 2016 18:22:49
Category: general
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 2.5, 2.6, 3.0
 Discussion Lock: Any
Operating System: Any
 Planned Release: 

___

Details:

While checking Russian translation to upcoming release I discovered some
missed pluralizations ("%d gold", "%d tiles") and typos in msgids.

The fix is onboard, see gna patch #6908.




___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24328] A number of text buffers have insufficient size

2016-01-20 Thread Konstantin Vedeneev
Follow-up Comment #7, bug #24328 (project freeciv):

Two more buffers from city list:

1. strlen(Q_("?city_state:Peace"))=22
2. _("J.S. Bach's Cathedral"), " (1234/5678) ", _("(worklist)")
oversizes 128 bits.


--- client/cityrepdata.c(revision 31516)
+++ client/cityrepdata.c(working copy)
@@ -102,7 +102,7 @@
 static const char *cr_entry_hstate_verbose(const struct city *pcity,
   const void *data)
 {
-  static char buf[16];
+  static char buf[32];
   fc_snprintf(buf, sizeof(buf), "%s",
   (city_celebrating(pcity) ? Q_("?city_state:Celebrating")
: (city_unhappy(pcity) ? Q_("?city_state:Disorder")
@@ -517,7 +517,7 @@
 static const char *cr_entry_building(const struct city *pcity,
 const void *data)
 {
-  static char buf[128];
+  static char buf[192];
   const char *from_worklist =
 worklist_is_empty(>worklist) ? "" :
 gui_options.concise_city_production ? "+" : _("(worklist)");



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24328] A number of text buffers have insufficient size

2016-01-20 Thread Konstantin Vedeneev
Follow-up Comment #9, bug #24328 (project freeciv):

Yes, I can. Sorry, didn't it earlier.



(file #26403)
___

Additional Item Attachment:

File name: CityReportBuffers.patchSize:0 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24328] A number of text buffers have insufficient size

2016-01-18 Thread Konstantin Vedeneev
Follow-up Comment #2, bug #24328 (project freeciv):

Marko, thank you for the fast reply.

Test passed, file #26379 just summarize patches I've already tested on 2.5 and
2.6 (@svn).

With the current state of translations the bug is specific only to the Russian
locale, so there're no urgent need to postpone 2.5.2 release again.

I know Jacob hurry to issue release to push it into debian sid to have
ubuntu's net pulled Freeciv 2.5.2 before their package frozing. So there're no
need of brokenly patching 2.5 branch.

But 2.6 (and trunk too) have to be patched before first beta will be issued.

As I said in pps., there're can be buffers with insufficient size not related
to the bitwise settings. AFAIR, there was similar issue with city state in the
cities table, but I've just shortened the translation.

So, please leave this bug opened — I'll attach issues found after more deep
tests.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #24328] A number of text buffers have insufficient size

2016-01-18 Thread Konstantin Vedeneev
URL:
  

 Summary: A number of text buffers have insufficient size
 Project: Freeciv
Submitted by: konved
Submitted on: Пн 18 янв 2016 21:27:11
Category: general
Severity: 2 - Minor
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 2.5.x, 2.6, 3.0
 Discussion Lock: Any
Operating System: Any
 Planned Release: 

___

Details:

The issue is related to the Russian i18n, but would be actual for other
languages with non-latin script (for ex: Hebrew, Arabic, Bulgarian, Ukrainian,
etc.), of course if their translators suddenly appear :).


23:35 konved@lark: ~/freeciv25 $ ./freeciv-server
Encodings: Data=UTF-8, Local=UTF-8, Internal=UTF-8
Это сервер игры Freeciv версии 2.5.1+ (modified r31484)
[...]
> set airliftingstyle FROM_ALLIES|TO_ALLIES|SRC_UNLIMITED|DEST_UNLIMITED
Invalid string conversion from UTF-8 to UTF-8: Неверный или
неполный мультибайтный или широкий
символ.
Консоль: значение параметра 'airliftingstyle' было
изменено на "Переброска по воздуху из
союзных �, "Переброска по воздуху в
союзные г�, "Неограниченное число из
пункта от и "Неограниченное число в пункт
н�.
> show airliftingstyle 
--
В столбце '##' показана возможность
изменения значения параметра:
 — знак '!' означает, что изменение
параметра заблокировано набором правил.
 — знак '+' означает, что Вы можете изменить
значение параметра.
 — знак '=' означает, что параметр
установлен в значение по умолчанию.
--
Параметр  ## значение (мин, макс)
--
airliftingstyle   +  "Переброска по воздуху
Invalid string conversion from UTF-8 to UTF-8: Неверный или
неполный мультибайтный или широкий
символ.
 из союзных �,
 "Переброска по воздуху
Invalid string conversion from UTF-8 to UTF-8: Неверный или
неполный мультибайтный или широкий
символ.
 в союзные г�,
 "Неограниченное число
 из пункта от и
 "Неограниченное число
 в пункт назн

(FROM_ALLIES|TO_ALLIES|SRC_UNLIMITED|DEST_UNLIMITED)
--
Справка по каждому параметру доступна при
помощи команды 'help <параметр>'.
--
>

You can see that some lines are incorrectly cut.

Reference: Russian error text "Неверный или неполный
мультибайтный или широкий символ." came from
libc's i18n and means "Invalid or incomplete multibyte or wide character".

Reference 2: With Russian locale the nowadays string Q_("Allows units to be
airlifted from allied cities") have only 32 characters but is 75 (!) bytes
long in UTF-8 encoding (as strlen() reports).

The 'revealmap' setting have the same issue (/set revealmap DEAD).

Okay, let's start patching from setting_bitwise_to_str():

--- server/settings.c   (revision 31484)
+++ server/settings.c   (working copy)
@@ -3234,7 +3234,7 @@
   int bit;
 
   if (pretty) {
-char buf2[64];
+char buf2[128];


And we can see (I've dropped head of table):

> set airliftingstyle FROM_ALLIES|TO_ALLIES|SRC_UNLIMITED|DEST_UNLIMITED
Консоль: значение параметра 'airliftingstyle' было
изменено на "Переброска по воздуху из
союзных городов", "Переброска по воздуху в
союзные города", "Неограниченное число из
пункта отправления" и "Неогран.
> show airliftingstyle 
--
airliftingstyle   +  "Переброска по воздуху
 из союзных городов",
 "Переброска по воздуху
 в союзные города",
 "Неограниченное число
 из пункта отправления"
 и "Неограниченное
 число в пункт
 назначения"
 [](FROM_ALLIE|
--


Well, parts of and-list are no longer truncated but the entire list doesn't
fit into another buffer now.

_[some gdb poking skipped]_

Catched show_settings_one(). Patching...

--- server/console.h(revision 31484)
+++ server/console.h(working copy)
@@ -15,7 +15,7 @@
 
 #include "support.h"/* bool type and fc__attribute */
 
-#define MAX_LEN_CONSOLE_LINE 512

[Freeciv-Dev] [bug #23309] Austrian nation inavailable for translation.

2015-02-24 Thread Konstantin Vedeneev
Follow-up Comment #4, bug #23309 (project freeciv):

Test passed, looks fine.
Thanks.

(file #23908)
___

Additional Item Attachment:

File name: pick-a-nation-ru.png   Size:360 KB


___

Reply to this item at:

  http://gna.org/bugs/?23309

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #23309] Austrian nation inavailable for translation.

2015-02-23 Thread Konstantin Vedeneev
Follow-up Comment #2, bug #23309 (project freeciv):

Yes, it's includes. But after selecting Expanded nationset in Pick nation
dialog or using '/set nationset all' command translation disappears.
This is clearly seen when the Russian locale is used, due to its non-latin
script.

___

Reply to this item at:

  http://gna.org/bugs/?23309

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev