[etoys-notify] [JIRA] Updated: (SQ-139) Ambiguous translation strings

tracker at squeakland.org tracker at squeakland.org
Fri Aug 21 17:24:26 EDT 2009


     [ http://tracker.immuexa.com/browse/SQ-139?page=all ]

Scott Wallace updated SQ-139:
-----------------------------

    Attachment: proto1.zip

Attached Korakurider's fileouts that accompanied the following email he sent to etoys-dev on 3 august 2009:

Hi all.
For http://tracker.squeakland.org/browse/SQ-139 ,
I am playing with prototype of msgctxt support in Etoys and want to
discuss with you about this.

Changesets:
	1) trnCtxCore-KR	msgctxt support for translation engine

	2) transCtxSelector-KR	To use selector name of method that sender of
				#translated and #translatedNoop as msgctxt


	3) transCtxExplicit-KR		
				#translatedWithContext:
				and #translatedNoopWithContext:
				-- variant of #translated and #translatedNoop
				   with manually specified msgctxt

	4) Using #translatedWithCtx: and #translatedNoopWithContext.
		ex1VocaCore-KR
		ex2Voca-KR
		ex3Sound-KR
		ex4Halo-KR
		ex5Parts-KR			

**How to try it:

   1) Build experimental image
	1.1) Grab fresh developer image and update to the latest.
	1.2) Apply changesets 1)-4) to the image
	1.3) Download the latest PO file for you language from
			http://translate.sugarlabs.org/
	1.4) Switch locale to your language.
	1.5) Open LanguageEditor and load the PO of 1.3) with
		"gettext import" functionality.

   2) Generate PO with msgctxt
	Evaluate this:

		GetTextExporter2 new exportTranslator:
			(InternalTranslator newLocaleID: LocaleID current).

	Generated PO is at po/etoys/$(LANG).po under your image.

   3) Save image and exit.

   4) Explore and edit PO
   	4.1) Generated PO is like this:

		#: Morphic-Kernel,_Morph>>additionsToViewerCategoryBasic
		msgctxt "Morph>>additionsToViewerCategoryBasic"
		msgid "y"
		msgstr " (... some translation ...)"

	You could see new statement "msgctxt" with name of selector where
	the string is located.
	If same string has multiple occurrences, each has its msgctxt/msgid
	specification.  and you could supply different translation for each
	occurrences.


	4.2) compile MO
		msgfmt -o etoys.mo yourpofile
	
		and place etoys.mo to
                     locale/$(LANG)/LC_MESSAGES
              under your image.

    5) restart Etoys with the changes, switch to your language,
	and check how translation is executed.


**Manually specifying msgctxt

	For some strings with #translatedNoop, #translated is applied in
	other location and  "selector as msgctxt" doesn't work.
	It is needed to manually specify msgctxt.  "What as msgctxt"
	needs to be negotiated between providers(#translatedNoopWithContext:)
	and consumers(#translatedWithContext:).

       Source code become ugly because there are many occurrences of
such use case.
       But I couldn't think of better idea.

/Korakurider

> Ambiguous translation strings
> -----------------------------
>
>          Key: SQ-139
>          URL: http://tracker.immuexa.com/browse/SQ-139
>      Project: squeakland
>         Type: Improvement
>   Components: etoys
>     Reporter: Scott Wallace
>     Priority: Critical
>      Fix For: review
>  Attachments: etoys_ambiguous_string.txt, proto1.zip
>
>
> From TRAC 6757 (gdsteiner, March 2008)
> There are several strings in etoys.po which need 2 different translations. For more details please see the thread starting with http://lists.laptop.org/pipermail/localization/2008-March/000726.html
> Most of the strings we couldn't translate well into german are used in script tiles AND halo/menus (for a list please simply check the etoys vocabulary summary).
> Attached please find also a list with ambiguous etoys translations strings from the actual etoys.po on Pootle. This is a manually generated list to show examples for problematic strings. It is possible to reduce the list with some discussion about details.
> Dangerous strings are
> 1. all strings which are used in more than one place, especially those which are used in script tiles AND halo/menus.
> 2. Basic/General strings as "copy", "clear", "none", "quit", "save", next, "previous", "last", ... 3. Strings, which are used very often in many different forms ("change font", " change font ", "Change font", "Change font:"), ...
> Splitting etoys.po will reduce the conflicts (at least for translators), but also after that a few context- dependent translations will be necessary IMHO.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://tracker.immuexa.com/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



More information about the etoys-notify mailing list