Issue 112478

Summary: [Automation] Testscript needed to find duplicate functionnames
Product: Build Tools Reporter: oc
Component: codeAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: bormant, dwayne, epost, gregor.hartmann, hans_werner67, issues, ivo.hinkelmann, jordis.lists, khirano, Mathias_Bauer, mdxonefour, niklas.nebel, rafaella.braconi, rudolfs.mazurs, ruediger.timm
Version: DEV300m82   
Target Milestone: 3.4.1   
Hardware: All   
OS: All   
Issue Type: TASK Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
results of duplicate check. Encoding is utf8
none
new log of duplicates
none
and here comes the sdf
none
logfile of all duplicates (alllang)
none
sdf file containing the duplicate strings (alllang)
none
Serbian Cyrillic (sr) and Serbian Latin (sh) fix none

Description oc 2010-06-17 15:01:18 UTC
To make sure that there are no duplicate functionnames implemented by
Translation an automated test is needed
Comment 1 rafaella.braconi 2010-06-17 15:08:21 UTC
setting target to 3.3 as double function names are showstoppers that can put a
release to risk.
Comment 2 oc 2010-08-24 14:58:45 UTC
setting target 3.4
Comment 3 rafaella.braconi 2010-08-24 15:08:26 UTC
adding md
Comment 4 rafaella.braconi 2010-08-26 17:20:26 UTC
resetting target. As discussed and agreed during our PM meeting, this issue need
to be resolved for the 3.3. An automatic test need to be created in order not to
introduce double name functions which are definitively showstoppers. Such an
automatic test need to be in place by September 30th.
Comment 5 oc 2010-09-21 15:11:44 UTC
Automatic testing by the testtool is not a solution for this problem, maybe it
is possible to implement a check within the sourcecode => fma
Comment 6 hans_werner67 2010-12-07 13:36:42 UTC
Reassign to ihi,
we need a solution (as discussed before) to check for different en-US
source-strings and equal target-strings in area function-names.
Comment 7 ivo.hinkelmann 2010-12-07 14:36:18 UTC
-> gh
Comment 8 rafaella.braconi 2010-12-09 13:16:57 UTC
@gh, fma: there is also another area where the usage of the same name in the
translation breaks the function. This is in the Stylist. An example is Title and
Heading translated with the same word or no distinction in the plural form. May
be we can use the same script to check this area as well?
Comment 9 gregor.hartmann 2011-01-13 16:13:02 UTC
@coni: please add short sdf files with the en-US strings which have to be unique
in the translation, so I can see what exactly to check.

alternatively name the (src) files which contain the sources, if necessary
describing which part(s) are to be checked.

thanks
Comment 10 rafaella.braconi 2011-01-14 15:44:46 UTC
@nn,mba can you please help check if there are more files containing strings
that need to be unique to guarantee functionality?

Styles:
/sw/source/ui/utlui.po

Function names:
/formula / source / core / resource.po 
/sc / source / ui / src.po
Comment 11 niklas.nebel 2011-01-14 16:13:46 UTC
Function names are in formula/source/core/resource/core_resource.src,
scaddins/source/analysis/analysis_funcnames.src and
scaddins/source/datefunc/datefunc.src.

analysis_funcnames has already been a problem in the past, see issue 115937.

I'm not sure about sc/source/ui/src. Which strings from there do you check?
Comment 12 rafaella.braconi 2011-02-15 11:09:43 UTC
Gregor,which is the status of this issue? Any progress with this? Thx!
Comment 13 gregor.hartmann 2011-04-01 11:38:00 UTC
added checks for the following items:

formula/source/core/resource.core_resource.src   Gid RID_STRLIST_FUNCTION_NAMES
scaddins/source/analysis/analysis_funcnames.src   Gid RID_ANALYSIS_FUNCTION_NAMES
scaddins/source/datefunc/datefunc.src   Gid RID_DATE_FUNCTION_NAMES
sw/source/ui/utlui/poolfmt.src   Gid "STR_POOLNUMRULE_.*"
sw/source/ui/utlui/poolfmt.src   Gid "STR_POOLCOLL_.*"

Need more exact info on what to check in /sc / source / ui / src.po

Please check if that's all in the abobe mentioned checks
Comment 14 gregor.hartmann 2011-04-01 12:47:38 UTC
Created attachment 76246 [details]
results of duplicate check. Encoding is utf8

Just ran the script over all languages, attached the results. 
Encoding is utf8

There is some work to do!
Comment 15 gregor.hartmann 2011-04-01 13:16:50 UTC
sorry, the log was from an m100 and not on the current pootle and download files. will redo in a minute
Comment 16 gregor.hartmann 2011-04-01 13:45:21 UTC
Created attachment 76247 [details]
new log of duplicates

here is a new run with the sdf files found on the continuous l10n buildmachine for m105 dated yesterday (31. of March) 

only 10 duplicates left
Comment 17 gregor.hartmann 2011-04-01 13:46:18 UTC
Created attachment 76248 [details]
and here comes the sdf

and here comes the corresponding sdf file
Comment 18 gregor.hartmann 2011-04-05 09:56:17 UTC
Hi, I was too quick last week, I checked only the languages which were part of that build. These were 

de es fr hu it ja ko nl pl pt pt-BR ru sv th tr zh-CN zh-TW ar

I will attach a new file containing the results for all languages in a minute

sorry for the confusion
Comment 19 gregor.hartmann 2011-04-05 11:26:11 UTC
The following is distrubution of duplicates


# 	 Module	File
=========================== 
39	 formula	source\core\resource\core_resource.src
83	 scaddins	source\analysis\analysis_funcnames.src
7	 scaddins	source\datefunc\datefunc.src
164	 sw	source\ui\utlui\poolfmt.src

#	Language
============================
2	 as
8	 ast
1	 be-BY
1	 bg
7	 bn
13	 bo
5	 br
3	 brx
2	 bs
5	 ca
5	 ca-XV
3	 cy
1	 dgo
4	 eo
1	 fa
29	 gd
2	 gl
1	 gu
1	 he
4	 hi
5	 hr
4	 id
1	 it
2	 ka
2	 kk
3	 kn
7	 kok
3	 ks
16	 ku
1	 lt
2	 lv
4	 mai
2	 mk
1	 ml
4	 mn
3	 mni
1	 mr
1	 my
1	 nb
1	 ne
2	 nn
2	 oc
2	 om
2	 or
2	 pl
1	 pt
1	 pt-BR
1	 ro
1	 ru
1	 rw
1	 sa-IN
1	 sat
1	 sd
2	 sh
2	 sk
1	 sl
91	 sq
2	 sr
1	 sv
3	 ta
1	 te
3	 tg
3	 tr
2	 ug
1	 uk
1	 uz
Comment 20 gregor.hartmann 2011-04-05 11:38:30 UTC
Created attachment 76270 [details]
logfile of all duplicates (alllang)

the following languages contain no translations in any of the sections and this will also fail building once this check is in the buildprocess

bo brx dgo dz fa fur gd he hi jbo kab ka kk kok ks mai mni my ne ny pa-IN pap ps sa-IN sat sc sd so th tk uk
Comment 21 gregor.hartmann 2011-04-05 11:39:46 UTC
Created attachment 76271 [details]
sdf file containing the duplicate strings (alllang)
Comment 22 gregor.hartmann 2011-04-13 11:17:38 UTC
@coni: please send back when the majority of duplicate strings is fixed, so I can proceed implementing this feature in every build.

*NOTE* this will break the build if duplicate strings are detected
Comment 23 rafaella.braconi 2011-04-15 08:38:07 UTC
Langauges fixed so far are: 
it, pl, br, sv, pt
Comment 24 Dwayne Bailey 2011-04-15 10:42:13 UTC
There is a tool called poconflicts that can be used to do these types of checks.  I'd suggest using that instead.

http://translate.sourceforge.net/wiki/toolkit/poconflicts
Comment 25 gregor.hartmann 2011-04-15 12:19:11 UTC
@dwayne: thanks for the suggestion, but as I read it poconflicts does the reverse thing.

What we need here is that englich different words are also different in the translation. E.g. the calc function names must be distinct.
Comment 26 grakic 2011-04-16 01:53:36 UTC
Created attachment 76398 [details]
Serbian Cyrillic (sr) and Serbian Latin (sh) fix

Two translations are changed to avoid duplicates, SDF file is attached.
Comment 27 jordis 2011-04-16 13:21:43 UTC
Catalan (ca) fixed in Pootle.
Comment 28 tranzistors 2011-04-20 08:59:36 UTC
Latvian (lv) fixed in poootle.
Comment 29 Dwayne Bailey 2011-04-20 09:24:35 UTC
(In reply to comment #25)
> @dwayne: thanks for the suggestion, but as I read it poconflicts does the
> reverse thing.
> 
> What we need here is that englich different words are also different in the
> translation. E.g. the calc function names must be distinct.

poconflicts -v would do that

More importantly can you create output that is immediately useful for the translator?  A URL that links back to the offending string in Pootle is much more useful then trying to interpret the output.

I spent more time doing two things 1) Trying to understand the error, 2) Finding the error in Pootle, then it took to actually correct the error.
Comment 30 bormant 2011-04-20 11:19:01 UTC
Russian (ru) fixed in Pootle.

And yes, Pootle can not find messages by "#:" ids, so we can't use RID_STRLIST_FUNCTION_NAMES or same unique ids for search (in Pootle).
Comment 31 Dwayne Bailey 2011-04-20 11:30:31 UTC
(In reply to comment #30)
> Russian (ru) fixed in Pootle.
> 
> And yes, Pootle can not find messages by "#:" ids, so we can't use
> RID_STRLIST_FUNCTION_NAMES or same unique ids for search (in Pootle).

It can find locations.  You need to select location from the dropdown.
Comment 32 bormant 2011-04-21 10:18:57 UTC
(In reply to comment #31)
> (In reply to comment #30)
> > Russian (ru) fixed in Pootle.
> > 
> > And yes, Pootle can not find messages by "#:" ids, so we can't use
> > RID_STRLIST_FUNCTION_NAMES or same unique ids for search (in Pootle).
> 
> It can find locations.  You need to select location from the dropdown.

All four checkboxes of search dropdown was selected before search was satrted. This didn't help. "No matching strings to translate" was returned.
Comment 33 bormant 2011-04-21 10:38:29 UTC
(In reply to comment #31)
> (In reply to comment #30)
> > Russian (ru) fixed in Pootle.
> > 
> > And yes, Pootle can not find messages by "#:" ids, so we can't use
> > RID_STRLIST_FUNCTION_NAMES or same unique ids for search (in Pootle).
> 
> It can find locations.  You need to select location from the dropdown.

I found that underscore "_" breaks search. I can find "RID", "STRLIST", "FUNCTION", "NAMES", but not "RID_STRLIST_FUNCTION_NAMES". Quotes doesn't help.
Comment 34 Dwayne Bailey 2011-04-21 11:03:16 UTC
(In reply to comment #32)
> (In reply to comment #31)
> > (In reply to comment #30)
> > > Russian (ru) fixed in Pootle.
> > > 
> > > And yes, Pootle can not find messages by "#:" ids, so we can't use
> > > RID_STRLIST_FUNCTION_NAMES or same unique ids for search (in Pootle).
> > 
> > It can find locations.  You need to select location from the dropdown.
> 
> All four checkboxes of search dropdown was selected before search was satrted.
> This didn't help. "No matching strings to translate" was returned.

The Pootle server needs upgrading.