Issue 52818

Summary: translated string containing space gets truncated after compilation
Product: Internationalization Reporter: yury_t <yury.tarasievich>
Component: uiAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues, pavel
Version: OOo 2.0 Beta   
Target Milestone: ---   
Hardware: PC   
OS: FreeBSD   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Sample screenshot from cs version none

Description yury_t 2005-08-03 10:10:11 UTC
If string "Untitled" is translated to something containing space (in my case it was "Без назвы"), then after 
compilation second word gets truncated, in combolist (tools-customize-macros-save to file) only first word 
shows. The identity of string is:
sfx2 source\appl\sfx.src 0 string STR_NONAME 0
Comment 1 eric.savary 2005-08-04 16:29:28 UTC
This looks to me like an How-To for developper, not a proper OOo issue (other
languages already include spaces exactly for this string: "Sans nom", "Sin
nome"...).
Please ask the dev mailing list.
Thanx!
Comment 2 eric.savary 2005-08-04 16:34:31 UTC
closed
Comment 3 pavel 2005-08-06 07:56:43 UTC
reopening.
This is valid issue.
Comment 4 pavel 2005-08-06 07:59:44 UTC
confirmed.

In cs we have:

pavel@paveljanik:~> bzcat .ooo/build/Files/2.0/GSI_cs.sdf.bz2 |grep
STR_NONAME|grep sfx2
sfx2    source\appl\sfx.src     0       string  STR_NONAME                    
0en-US   Untitled                                20050802 18:44:04
sfx2    source\appl\sfx.src     0       string  STR_NONAME                    
0cs      Bez názvu

But in the UI dialog Tools - Configure - Events, I see only "Bez" in the
listbox. See attached screenshot.
Comment 5 pavel 2005-08-06 08:00:18 UTC
Created attachment 28529 [details]
Sample screenshot from cs version
Comment 6 pavel 2005-08-06 08:02:09 UTC
The string was merged correctly into localize.sdf file as"

source/appl/localize.sdf:sfx2   source\appl\sfx.src  0  string  STR_NONAME     0
cs      Bez názvu                      2002-02-02 02:02:02
Comment 7 pavel 2005-08-06 08:41:49 UTC
Looks like the problem is in the function

void
SvxScriptSelectorDialog::GetDocTitle(
	const Reference< frame::XModel >& xModel,
	OUString& rTitle )

in svx/source/dialog/selector.cxx. This function is eventdlg.cxx as:

			OUString aTitle;
			SvxScriptSelectorDialog::GetDocTitle( xModel, aTitle );
            nPos = aSaveInListBox.InsertEntry( aTitle );

to add the title of the document.

Because the new document is not yet saved, this part of GetDocTitle is used:

			    if ( xModel->getURL().getLength() == 0 )
			    {
				    // process "UntitledX - YYYYYYYY" // to get UntitledX
				    sal_Int32 pos = 0;
				    aResult = tmp.getToken(0, ' ', pos);
			    }

Only the first word of the document name is used.

Reassigning to tbe because he was probably the last one who touched this code.
Comment 8 thomas.benisch 2005-08-16 10:21:46 UTC
set target OOo Later
Comment 9 thomas.benisch 2005-12-07 16:04:45 UTC
TBE->AB: As discussed to you.
Comment 10 ab 2006-05-19 13:12:11 UTC
STARTED
Comment 11 Marcus 2017-05-20 11:13:32 UTC
Reset assigne to the default "issues@openoffice.apache.org".