bugBattle for Wesnoth - Bugs: bug #19665, Screenshot indexer bug on Windows...

 
 
Show feedback again

bug #19665: Screenshot indexer bug on Windows (and translation of it's filenames)

Submitted by:  Fallen Phoenix <fphoenix>
Submitted on:  Thu 26 Apr 2012 10:57:59 PM UTC  
 
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Translations
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: 1.10.2Operating System: Windows XP

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 27 Apr 2012 12:52:56 AM UTC, comment #3:

I agree about variable, but just decided to post the easiest variant as example, that i see how to do.

And yes, bad citing - just I didn't know about tags on this tracker, and it turned underline characters to italic formatting. I don't see preview and edit buttons here, so it's not easy for me to make good post from first attempt :)

hotkeys.cpp
Current code:
Proposed code:

Fallen Phoenix <fphoenix>
Fri 27 Apr 2012 12:03:49 AM UTC, comment #2:

The second part of this report should really have been a feature request in a new tracker issue instead; regardless, I'll address it here for now.

What you suggest is that we let translators choose an appropriate filename component separator for their language? Because it seems to me like a better approach would be for them to be able to translate a proper format string like the following:

"Screenshot_$number"
"Map-Screenshot_$number"

This way they could also choose whether $number (which is replaced at runtime by the actual screenshot number) should go in front or at the end of the label.

By the way, when citing source code it's better that you don't change it in the post. For example, ("Foo") (a non-translatable string) is not the same as _("Foo") (a translatable string).

Ignacio R. Morelle <shadowmaster>
Project Administrator
Thu 26 Apr 2012 11:05:15 PM UTC, comment #1:

i.e. to

Fallen Phoenix <fphoenix>
Thu 26 Apr 2012 10:57:59 PM UTC, original submission:

There was bug with incorrect encoding until 1.10.2 version (#19425). In 1.10.2 encoding was normalized, but now game can't set normal index to Cyrillic filenames and always overwrite zero-screenshot (000). Only under Windows, and only when using translation.

By the way, it's too bad that string "Screenshot" is shared in translation, i.e. used for both - hotkey list and part of filename:
|| WESNOTH-LIB.POT
|| #: src/hotkeys.cpp:67 src/hotkeys.cpp:1179
|| msgid "Screenshot"
|| msgstr ""
In Russian language it's normally translating with 2 words (like "screen shot"; we use an Anglicism too, but it's just a jargon), but translators can't choice a splitting character between this words and index, and summary name seems like "screen shot_000.bmp".
So I think, it will be much better, if you change this lines in hotkeys.cpp (for example):
|| std::string name = map_screenshot ? ("Map-Screenshot") : ("Screenshot");
|| std::string filename = get_screenshot_dir() + "/" + name + "_";
to
|| std::string name = map_screenshot ? ("Map-Screenshot") : ("Screenshot");
|| std::string filename = get_screenshot_dir() + "/" + name;

Fallen Phoenix <fphoenix>

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by fphoenix (Posted a comment)
  • -unavailable- added by shadowmaster (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 26 Apr 2012 11:07:24 PM UTCfphoenixCarbon-CopyRemoved 18426=>-
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup