Skip Menu |

This queue is for tickets about the Locale-Maketext-Utils CPAN distribution.

Report information
The Basics
Id: 78989
Status: open
Priority: 0/
Queue: Locale-Maketext-Utils

People
Owner: Nobody in particular
Requestors: dmuey [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Locale::Maketext::Utils::Phrase functions
1. escape bracket notation (e.g. for PBI 2951) 2. hack away markup characters + # swap markup for BN (or if inside BN an embeddable option?) + my $struct = Locale::Maketext::Utils::Phrase::phrase2struct($translated); + $translated = ''; + for my $piece ( @{$struct} ) { + if ( !ref($piece) ) { + $piece =~ s/'/[output,apos]/g; + $piece =~ s/"/[output,quot]/g; + $piece =~ s/</[output,lt]/g; + $piece =~ s/>/[output,gt]/g; + $piece =~ s/&/[output,amp]/g; + } + else { + + # in the event the method supports embedded methods great, in the event it doesn't at least it won't have markup + $piece->{'cont'} =~ s/'/chr\(39\)/g; + $piece->{'cont'} =~ s/"/chr\(34\)/g; + $piece->{'cont'} =~ s/</chr\(60\)/g; + $piece->{'cont'} =~ s/>/chr\(62\)/g; + $piece->{'cont'} =~ s/&/chr\(38\)/g; + + $translated .= "[$piece->{'cont'}]"; + } + }
#3 (or part of #2): whitespace normalizer #2 and #3 would be intended for cleaning up, known-wonky, machine translation
#4 – pre-phrase-class version of _modify_text() to walk struct my $target_phrase = modify_text_ow_whatever_its_called( $source_phrase, \&text_handler, @args_to_text_handler);