[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Tue, 7 May 2024 19:00:35 -0400 (EDT) |
branch: master
commit d775aa6958bf4d195dbcf7be229f65345a1469e2
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed May 8 00:59:53 2024 +0200
* tp/Texinfo/ParserNonXS.pm (_parse_def),
tp/Texinfo/XS/parsetexi/def.c (parse_def): put extra info
documentlanguage and translation_context in
untranslated_def_category_inserted element.
* tp/Texinfo/Convert/HTML.pm
(_convert_untranslated_def_category_inserted_type, _convert),
tp/Texinfo/XS/convert/convert_html.c
(convert_untranslated_def_category_inserted_type)
(convert_table_definition_type, convert_to_html_internal),
tp/Texinfo/Convert/LaTeX.pm (_convert),
tp/Texinfo/Convert/Plaintext.pm (_convert), tp/Texinfo/Convert/Text.pm
(_convert), tp/Texinfo/XS/main/convert_to_text.c
(convert_to_text_internal): convert especially the
untranslated_def_category_inserted element, performing the translation
of the text string in contents, instead of directly converting the
untranslated text element.
---
ChangeLog | 20 +++
tp/Texinfo/Common.pm | 4 +-
tp/Texinfo/Convert/HTML.pm | 37 +++--
tp/Texinfo/Convert/LaTeX.pm | 28 ++--
tp/Texinfo/Convert/Plaintext.pm | 120 +++++++-------
tp/Texinfo/Convert/Text.pm | 131 +++++++--------
tp/Texinfo/ParserNonXS.pm | 16 +-
tp/Texinfo/XS/convert/convert_html.c | 45 +++--
tp/Texinfo/XS/main/convert_to_text.c | 182 +++++++++++----------
tp/Texinfo/XS/parsetexi/def.c | 4 +-
tp/t/results/languages/documentlanguage.pl | 8 +-
tp/t/results/languages/documentlanguage_option.pl | 8 +-
tp/t/results/languages/documentlanguage_unknown.pl | 8 +-
.../results/languages/multiple_documentlanguage.pl | 24 +--
tp/t/results/languages/multiple_in_preamble.pl | 24 +--
.../languages/multiple_in_preamble_before_node.pl | 16 +-
tp/t/results/languages/multiple_lang_chapters.pl | 24 +--
.../languages/multiple_lang_chapters_latex.pl | 24 +--
.../languages/multiple_lang_chapters_texi2html.pl | 24 +--
tp/t/results/languages/simple_documentlanguage.pl | 8 +-
tp/t/results/languages/unknown_region.pl | 8 +-
21 files changed, 383 insertions(+), 380 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b7512780d8..9d7537a422 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2024-05-07 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/ParserNonXS.pm (_parse_def),
+ tp/Texinfo/XS/parsetexi/def.c (parse_def): put extra info
+ documentlanguage and translation_context in
+ untranslated_def_category_inserted element.
+
+ * tp/Texinfo/Convert/HTML.pm
+ (_convert_untranslated_def_category_inserted_type, _convert),
+ tp/Texinfo/XS/convert/convert_html.c
+ (convert_untranslated_def_category_inserted_type)
+ (convert_table_definition_type, convert_to_html_internal),
+ tp/Texinfo/Convert/LaTeX.pm (_convert),
+ tp/Texinfo/Convert/Plaintext.pm (_convert), tp/Texinfo/Convert/Text.pm
+ (_convert), tp/Texinfo/XS/main/convert_to_text.c
+ (convert_to_text_internal): convert especially the
+ untranslated_def_category_inserted element, performing the translation
+ of the text string in contents, instead of directly converting the
+ untranslated text element.
+
2024-05-07 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/Texinfo.pm (@ignored_types),
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index f53f0eb911..fe9e52b69f 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -419,8 +419,8 @@ our %def_map = (
'defop', [ 'category', 'class' , 'name', 'arg' ],
'deftp', [ 'category', 'name', 'argtype' ],
# shortcuts
- # The strings are marked to be translated in the parsers with type
- # 'untranslated'.
+ # The strings are marked to be translated in the parsers in type
+ # 'untranslated_def_category_inserted'.
'defun', {'deffn' => pgdt_context(
'category of functions for @defun',
'Function')},
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 0c51709edc..ae6bf711b9 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -7379,6 +7379,30 @@ sub _simplify_text_for_comparison($)
return $text;
}
+sub _convert_untranslated_def_category_inserted_type($$$$) {
+ my $self = shift;
+ my $type = shift;
+ my $element = shift;
+ my $content = shift;
+
+ my $translated;
+ my $category_text = $element->{'contents'}->[0]->{'text'};
+ if ($element->{'extra'}
+ and $element->{'extra'}->{'translation_context'}) {
+ $translated = $self->pcdt($element->{'extra'}->{'translation_context'},
+ $category_text);
+ } else {
+ $translated = $self->cdt($category_text);
+ }
+ my $result = $self->convert_tree($translated, 'translated TEXT');
+
+ return $result;
+}
+
+$default_types_conversion{'untranslated_def_category_inserted'}
+ = \&_convert_untranslated_def_category_inserted_type;
+
+
sub _convert_row_type($$$$) {
my $self = shift;
my $type = shift;
@@ -13477,16 +13501,6 @@ sub _convert($$;$)
# already converted to html, keep it as is
if ($element->{'type'} and $element->{'type'} eq '_converted') {
$result = $element->{'text'};
- } elsif ($element->{'type'} and $element->{'type'} eq 'untranslated') {
- my $translated;
- if ($element->{'extra'}
- and $element->{'extra'}->{'translation_context'}) {
- $translated = $self->pcdt($element->{'extra'}->{'translation_context'},
- $element->{'text'});
- } else {
- $translated = $self->cdt($element->{'text'});
- }
- $result = $self->_convert($translated, 'translated TEXT');
} else {
$result = &{$self->{'types_conversion'}->{'text'}} ($self,
$element->{'type'},
@@ -13698,7 +13712,8 @@ sub _convert($$;$)
$content_formatted = $self->_convert($element->{'args'}->[0],
"DEFINFOENCLOSE_ARG");
}
- } elsif ($element->{'contents'}) {
+ } elsif ($element->{'contents'}
+ and $type_name ne 'untranslated_def_category_inserted') {
my $content_idx = 0;
foreach my $content (@{$element->{'contents'}}) {
$content_formatted
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index b83c5ce33f..c1129d1a48 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -2706,21 +2706,8 @@ sub _convert($$)
# process text
if (defined($element->{'text'})) {
- if (!$type or $type ne 'untranslated') {
- $result .= _protect_text($self, $element->{'text'});
- return $result;
- } else {
- my $tree;
- if ($element->{'extra'}
- and $element->{'extra'}->{'translation_context'}) {
- $tree = $self->pcdt($element->{'extra'}->{'translation_context'},
- $element->{'text'});
- } else {
- $tree = $self->cdt($element->{'text'});
- }
- my $converted = _convert($self, $tree);
- return $converted;
- }
+ $result .= _protect_text($self, $element->{'text'});
+ return $result;
}
# for displaymath that closes the preformatted
@@ -4307,6 +4294,17 @@ sub _convert($$)
$result .= _open_preformatted($self, $element);
} elsif ($element->{'type'} eq '_dot_not_end_sentence') {
$self->{'formatting_context'}->[-1]->{'dot_not_end_sentence'} += 1;
+ } elsif ($element->{'type'} eq 'untranslated_def_category_inserted') {
+ my $tree;
+ if ($element->{'extra'}
+ and $element->{'extra'}->{'translation_context'}) {
+ $tree = $self->pcdt($element->{'extra'}->{'translation_context'},
+ $element->{'contents'}->[0]->{'text'});
+ } else {
+ $tree = $self->cdt($element->{'contents'}->[0]->{'text'});
+ }
+ my $converted = _convert($self, $tree);
+ return $converted;
}
}
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index 959da67822..0e15452585 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -2138,77 +2138,64 @@ sub _convert($$)
# process text
if (defined($element->{'text'})) {
- if (!$type or $type ne 'untranslated') {
- if (!$formatter->{'_top_formatter'}) {
- if ($type and $type eq 'raw') {
- _stream_output($self,
- add_next($formatter->{'container'}, $element->{'text'}),
- $formatter->{'container'});
- } else {
- # Convert ``, '', `, ', ---, -- in $COMMAND->{'text'} to their
- # output, possibly coverting to upper case as well.
- my $text = $element->{'text'};
+ if (!$formatter->{'_top_formatter'}) {
+ if ($type and $type eq 'raw') {
+ _stream_output($self,
+ add_next($formatter->{'container'}, $element->{'text'}),
+ $formatter->{'container'});
+ } else {
+ # Convert ``, '', `, ', ---, -- in $COMMAND->{'text'} to their
+ # output, possibly coverting to upper case as well.
+ my $text = $element->{'text'};
- if ($formatter->{'upper_case_stack'}->[-1]->{'upper_case'}) {
- $text = _protect_sentence_ends($text);
- $text = uc($text);
- }
- if (!$self->{'ascii_dashes_and_quotes'} and $self->{'to_utf8'}) {
- $text = Texinfo::Convert::Unicode::unicode_text($text,
- $formatter->{'font_type_stack'}->[-1]->{'monospace'});
- } elsif (!$formatter->{'font_type_stack'}->[-1]->{'monospace'}) {
- $text = _process_text_internal($text);
- }
+ if ($formatter->{'upper_case_stack'}->[-1]->{'upper_case'}) {
+ $text = _protect_sentence_ends($text);
+ $text = uc($text);
+ }
+ if (!$self->{'ascii_dashes_and_quotes'} and $self->{'to_utf8'}) {
+ $text = Texinfo::Convert::Unicode::unicode_text($text,
+ $formatter->{'font_type_stack'}->[-1]->{'monospace'});
+ } elsif (!$formatter->{'font_type_stack'}->[-1]->{'monospace'}) {
+ $text = _process_text_internal($text);
+ }
- # inlined below for efficiency
- #_stream_output($self,
- # add_text ($formatter->{'container'}, $text),
- # $formatter->{'container'});
+ # inlined below for efficiency
+ #_stream_output($self,
+ # add_text ($formatter->{'container'}, $text),
+ # $formatter->{'container'});
- my $added_text = add_text ($formatter->{'container'}, $text);
+ my $added_text = add_text ($formatter->{'container'}, $text);
- my $count_context = $self->{'count_context'}->[-1];
+ my $count_context = $self->{'count_context'}->[-1];
- if (defined($formatter->{'container'})) {
- # count number of newlines
- #my $count = $added_text =~ tr/\n//;
- my $count =
Texinfo::Convert::Paragraph::end_line_count($formatter->{'container'});
+ if (defined($formatter->{'container'})) {
+ # count number of newlines
+ #my $count = $added_text =~ tr/\n//;
+ my $count =
Texinfo::Convert::Paragraph::end_line_count($formatter->{'container'});
- $count_context->{'lines'} += $count;
- }
+ $count_context->{'lines'} += $count;
+ }
- if (!defined $count_context->{'pending_text'}) {
- $count_context->{'pending_text'} = '';
- }
- $count_context->{'pending_text'} .= $added_text;
+ if (!defined $count_context->{'pending_text'}) {
+ $count_context->{'pending_text'} = '';
}
- return;
- # the following is only possible if paragraphindent is set to asis
- } elsif ($type and $type eq 'spaces_before_paragraph') {
- _stream_output($self, $element->{'text'});
- return;
- # ignore text outside of any format, but warn if ignored text not empty
- } elsif ($element->{'text'} =~ /\S/) {
- $self->present_bug_message("ignored text not empty
`$element->{'text'}'",
- $element);
- return;
- } else {
- # miscellaneous top-level whitespace - possibly after an @image
- _stream_output($self,
- add_text($formatter->{'container'}, $element->{'text'}),
- $formatter->{'container'});
- return;
+ $count_context->{'pending_text'} .= $added_text;
}
+ return;
+ # the following is only possible if paragraphindent is set to asis
+ } elsif ($type and $type eq 'spaces_before_paragraph') {
+ _stream_output($self, $element->{'text'});
+ return;
+ # ignore text outside of any format, but warn if ignored text not empty
+ } elsif ($element->{'text'} =~ /\S/) {
+ $self->present_bug_message("ignored text not empty `$element->{'text'}'",
+ $element);
+ return;
} else {
- my $tree;
- if ($element->{'extra'}
- and $element->{'extra'}->{'translation_context'}) {
- $tree = $self->pcdt($element->{'extra'}->{'translation_context'},
- $element->{'text'});
- } else {
- $tree = $self->cdt($element->{'text'});
- }
- _convert($self, $tree);
+ # miscellaneous top-level whitespace - possibly after an @image
+ _stream_output($self,
+ add_text($formatter->{'container'}, $element->{'text'}),
+ $formatter->{'container'});
return;
}
}
@@ -4052,6 +4039,17 @@ sub _convert($$)
_open_code($formatter);
} elsif ($type eq '_stop_upper_case') {
push @{$formatter->{'upper_case_stack'}}, {};
+ } elsif ($type eq 'untranslated_def_category_inserted') {
+ my $tree;
+ if ($element->{'extra'}
+ and $element->{'extra'}->{'translation_context'}) {
+ $tree = $self->pcdt($element->{'extra'}->{'translation_context'},
+ $element->{'contents'}->[0]->{'text'});
+ } else {
+ $tree = $self->cdt($element->{'contents'}->[0]->{'text'});
+ }
+ _convert($self, $tree);
+ return;
}
}
diff --git a/tp/Texinfo/Convert/Text.pm b/tp/Texinfo/Convert/Text.pm
index 475bad064b..bd30a0c544 100644
--- a/tp/Texinfo/Convert/Text.pm
+++ b/tp/Texinfo/Convert/Text.pm
@@ -475,54 +475,26 @@ sub _convert($$)
$element->{'cmdname'}})))));
my $result = '';
if (defined($element->{'text'})) {
- if ($element->{'type'} and $element->{'type'} eq 'untranslated') {
- my $tree;
- my $translation_context;
- if ($element->{'extra'}
- and $element->{'extra'}->{'translation_context'}) {
- $translation_context = $element->{'extra'}->{'translation_context'};
- }
-
- if ($options and $options->{'converter'}) {
- # the tree documentlanguage corresponds to the documentlanguage
- # at the place of the tree, but the converter may want to use
- # another documentlanguage, for instance the documentlanguage at
- # the end of the preamble, so we let the converter set it.
- if ($translation_context) {
- $tree = $options->{'converter'}->pcdt($translation_context,
- $element->{'text'});
+ $result = $element->{'text'};
+ if ((! defined($element->{'type'})
+ or $element->{'type'} ne 'raw')
+ and !$options->{'_raw_state'}) {
+ if ($options->{'set_case'}) {
+ if ($options->{'set_case'} > 0) {
+ $result = uc($result);
} else {
- $tree = $options->{'converter'}->cdt($element->{'text'});
+ $result = lc($result);
}
- } else {
- # if there is no converter, we use the documentlanguage available
- # in the tree.
- $tree = Texinfo::Translations::gdt($element->{'text'},
- $element->{'extra'}->{'documentlanguage'},
- undef, undef, $translation_context);
}
- $result = _convert($options, $tree);
- } else {
- $result = $element->{'text'};
- if ((! defined($element->{'type'})
- or $element->{'type'} ne 'raw')
- and !$options->{'_raw_state'}) {
- if ($options->{'set_case'}) {
- if ($options->{'set_case'} > 0) {
- $result = uc($result);
- } else {
- $result = lc($result);
- }
- }
- if (!$options->{'_code_state'}) {
- $result =~ s/``/"/g;
- $result =~ s/\'\'/"/g;
- $result =~ s/---/\x{1F}/g;
- $result =~ s/--/-/g;
- $result =~ s/\x{1F}/--/g;
- }
+ if (!$options->{'_code_state'}) {
+ $result =~ s/``/"/g;
+ $result =~ s/\'\'/"/g;
+ $result =~ s/---/\x{1F}/g;
+ $result =~ s/--/-/g;
+ $result =~ s/\x{1F}/--/g;
}
}
+ return $result;
}
if ($element->{'cmdname'}) {
my $command = $element->{'cmdname'};
@@ -697,33 +669,64 @@ sub _convert($$)
$element->{'extra'}->{'item_number'}) . '. ';
}
}
- if ($element->{'type'} and $element->{'type'} eq 'def_line') {
- #print STDERR "DEF: $element->{'extra'}->{'def_command'}\n";
- my ($category_element, $class_element,
- $type_element, $name_element, $arguments)
- = Texinfo::Convert::Utils::definition_arguments_content($element);
-
- my $parsed_definition_category
- = Texinfo::Convert::Utils::definition_category_tree(
+ if ($element->{'type'}) {
+ if ($element->{'type'} eq 'def_line') {
+ #print STDERR "DEF: $element->{'extra'}->{'def_command'}\n";
+ my ($category_element, $class_element,
+ $type_element, $name_element, $arguments)
+ = Texinfo::Convert::Utils::definition_arguments_content($element);
+
+ my $parsed_definition_category
+ = Texinfo::Convert::Utils::definition_category_tree(
$options->{'converter'}, $element);
- if (defined($parsed_definition_category)) {
- my $converted_element = {'contents' =>
+ if (defined($parsed_definition_category)) {
+ my $converted_element = {'contents' =>
[$parsed_definition_category, {'text' => ': '}]};
- my $contents = $converted_element->{'contents'};
- if ($type_element) {
- push @$contents, ($type_element, {'text' => ' '});
+ my $contents = $converted_element->{'contents'};
+ if ($type_element) {
+ push @$contents, ($type_element, {'text' => ' '});
+ }
+ if ($name_element) {
+ push @$contents, $name_element;
+ }
+
+ if ($arguments) {
+ push @$contents, ({'text' => ' '}, $arguments);
+ }
+ push @$contents, {'text' => "\n"};
+ $options->{'_code_state'}++;
+ $result = _convert($options, $converted_element);
+ $options->{'_code_state'}--;
}
- if ($name_element) {
- push @$contents, $name_element;
+ } elsif ($element->{'type'} eq 'untranslated_def_category_inserted') {
+ my $tree;
+ my $category_text = $element->{'contents'}->[0]->{'text'};
+ my $translation_context;
+ if ($element->{'extra'}
+ and $element->{'extra'}->{'translation_context'}) {
+ $translation_context = $element->{'extra'}->{'translation_context'};
}
- if ($arguments) {
- push @$contents, ({'text' => ' '}, $arguments);
+ if ($options and $options->{'converter'}) {
+ # the tree documentlanguage corresponds to the documentlanguage
+ # at the place of the tree, but the converter may want to use
+ # another documentlanguage, for instance the documentlanguage at
+ # the end of the preamble, so we let the converter set it.
+ if ($translation_context) {
+ $tree = $options->{'converter'}->pcdt($translation_context,
+ $category_text);
+ } else {
+ $tree = $options->{'converter'}->cdt($category_text);
+ }
+ } else {
+ # if there is no converter, we use the documentlanguage available
+ # in the tree.
+ $tree = Texinfo::Translations::gdt($category_text,
+ $element->{'extra'}->{'documentlanguage'},
+ undef, undef, $translation_context);
}
- push @$contents, {'text' => "\n"};
- $options->{'_code_state'}++;
- $result = _convert($options, $converted_element);
- $options->{'_code_state'}--;
+ $result = _convert($options, $tree);
+ return $result;
}
}
if ($element->{'contents'}) {
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 8510db9a4d..0ef1974658 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -3292,22 +3292,24 @@ sub _parse_def($$$$)
($translation_context, $category) = @$category_translation_context;
}
- my $bracketed = { 'type' => 'def_category_inserted',
+ my $inserted_category = { 'type' => 'def_category_inserted',
'parent' => $current };
- my $content = { 'text' => $category, 'parent' => $bracketed };
+ my $content = { 'text' => $category, 'parent' => $inserted_category };
# the category string is an english string (such as Function). If
# documentlanguage is set it needs to be translated during the conversion.
if (defined($self->{'documentlanguage'})) {
- $bracketed->{'type'} = 'untranslated_def_category_inserted';
+ $inserted_category->{'type'} = 'untranslated_def_category_inserted';
$content->{'type'} = 'untranslated';
- $content->{'extra'} = {'documentlanguage' =>
$self->{'documentlanguage'}};
+ $inserted_category->{'extra'}
+ = {'documentlanguage' => $self->{'documentlanguage'}};
if (defined($translation_context)) {
- $content->{'extra'}->{'translation_context'} = $translation_context;
+ $inserted_category->{'extra'}->{'translation_context'}
+ = $translation_context;
}
}
- @{$bracketed->{'contents'}} = ($content);
+ @{$inserted_category->{'contents'}} = ($content);
- unshift @contents, $bracketed,
+ unshift @contents, $inserted_category,
{ 'text' => ' ', 'type' => 'spaces_inserted',
'parent' => $current,
'extra' => {'def_role' => 'spaces'},
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index 0a85f8af2f..0f3746b2fa 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -14171,6 +14171,27 @@ convert_definfoenclose_type (CONVERTER *self, const
enum element_type type,
format_protect_text (self, end, result);
}
+void
+convert_untranslated_def_category_inserted_type
+ (CONVERTER *self, const enum element_type type,
+ const ELEMENT *element, const char *content,
+ TEXT *result)
+{
+ const char *category_text = element->contents.list[0]->text.text;
+ const char *translation_context
+ = lookup_extra_string (element, "translation_context");
+ ELEMENT *translated = html_cdt_tree (category_text,
+ self, 0, translation_context);
+
+ add_tree_to_build (self, translated);
+
+ convert_to_html_internal (self, translated, result,
+ "translated TEXT");
+
+ remove_tree_to_build (self, translated);
+ destroy_element_and_children (translated);
+}
+
void
convert_row_type (CONVERTER *self, const enum element_type type,
const ELEMENT *element, const char *content,
@@ -15200,7 +15221,7 @@ convert_table_definition_type (CONVERTER *self, const
enum element_type type,
/* associate type to the C function implementing the conversion */
static const TYPE_INTERNAL_CONVERSION types_internal_conversion_table[] = {
{ET_balanced_braces, &convert_balanced_braces_type},
- {ET_before_item, convert_before_item_type},
+ {ET_before_item, &convert_before_item_type},
{ET_def_item, &convert_def_item_type},
{ET_inter_def_item, &convert_def_item_type},
{ET_before_defline, &convert_def_item_type},
@@ -15210,7 +15231,7 @@ static const TYPE_INTERNAL_CONVERSION
types_internal_conversion_table[] = {
{ET_table_definition, &convert_table_definition_type},
{ET_inter_item, &convert_table_definition_type},
{ET_menu_comment, &convert_menu_comment_type},
- {ET_menu_entry, convert_menu_entry_type},
+ {ET_menu_entry, &convert_menu_entry_type},
{ET_multitable_body, &convert_multitable_body_type},
{ET_multitable_head, &convert_multitable_head_type},
{ET_paragraph, &convert_paragraph_type},
@@ -15218,6 +15239,8 @@ static const TYPE_INTERNAL_CONVERSION
types_internal_conversion_table[] = {
{ET_row, &convert_row_type},
{ET_table_term, &convert_table_term_type},
{ET_text, &convert_text},
+ {ET_untranslated_def_category_inserted,
+ &convert_untranslated_def_category_inserted_type},
{0, 0},
};
@@ -18024,21 +18047,6 @@ convert_to_html_internal (CONVERTER *self, const
ELEMENT *element,
/* already converted to html, keep it as is, assume it cannot be NULL */
if (element->type == ET__converted)
text_append (&text_result, element->text.text);
- else if (element->type == ET_untranslated)
- {
- const char *translation_context
- = lookup_extra_string (element, "translation_context");
- ELEMENT *translated = html_cdt_tree (element->text.text,
- self, 0, translation_context);
-
- add_tree_to_build (self, translated);
-
- convert_to_html_internal (self, translated, &text_result,
- "translated TEXT");
-
- remove_tree_to_build (self, translated);
- destroy_element_and_children (translated);
- }
else
{
(*(self->current_types_conversion_function[ET_text].type_conversion))
@@ -18408,7 +18416,8 @@ convert_to_html_internal (CONVERTER *self, const
ELEMENT *element,
"DEFINFOENCLOSE_ARG");
}
}
- else if (element->contents.number > 0)
+ else if (element->contents.number > 0
+ && type != ET_untranslated_def_category_inserted)
{
int content_idx;
text_append (&content_formatted, "");
diff --git a/tp/Texinfo/XS/main/convert_to_text.c
b/tp/Texinfo/XS/main/convert_to_text.c
index b7fe2ebbd7..9a485ed44c 100644
--- a/tp/Texinfo/XS/main/convert_to_text.c
+++ b/tp/Texinfo/XS/main/convert_to_text.c
@@ -522,113 +522,72 @@ convert_to_text_internal (const ELEMENT *element,
TEXT_OPTIONS *text_options,
/* or element->text.space? */
if (element->text.end > 0)
{
- if (element->type == ET_untranslated)
+ char *p;
+ if (element->type == ET_raw
+ || text_options->raw_state)
+ ADD(element->text.text);
+ else
{
- ELEMENT *tree = 0;
- char *translation_context
- = lookup_extra_string (element, "translation_context");
+ char *cased = 0;
+ char *text;
- if (text_options->converter)
+ if (text_options->set_case)
{
- /*
- the tree documentlanguage corresponds to the documentlanguage
- at the place of the tree, but the converter may want to use
- another documentlanguage, for instance the documentlanguage at
- the end of the preamble, so we let the converter set it.
- */
- tree = cdt_tree (element->text.text, text_options->converter,
- 0, translation_context);
+ cased
+ = to_upper_or_lower_multibyte (element->text.text,
+ text_options->set_case);
+ text = cased;
}
else
{
- /* if there is no converter, we use the documentlanguage available
- in the tree. */
-
- const char *documentlanguage
- = lookup_extra_string (element, "documentlanguage");
-
- /* there is a possibility that some small strings are associated
- to the tree, and there is no document to get them. However
- it is very unlikely to have small strings given that the
- converted tree should be very simple and is a string only,
- no macro, no file */
- tree = gdt_tree (element->text.text, 0, documentlanguage,
- 0, 0, translation_context);
+ text = element->text.text;
}
- if (tree)
- {
- convert_to_text_internal (tree, text_options, result);
- destroy_element_and_children (tree);
- }
- }
- else
- {
- char *p;
- if (element->type == ET_raw
- || text_options->raw_state)
- ADD(element->text.text);
+ if (text_options->code_state)
+ ADD(text);
else
{
- char *cased = 0;
- char *text;
-
- if (text_options->set_case)
+ p = text;
+ while (*p)
{
- cased
- = to_upper_or_lower_multibyte (element->text.text,
- text_options->set_case);
- text = cased;
- }
- else
- {
- text = element->text.text;
- }
-
- if (text_options->code_state)
- ADD(text);
- else
- {
- p = text;
- while (*p)
+ int before_sep_nr = strcspn (p, "-'`");
+ if (before_sep_nr)
{
- int before_sep_nr = strcspn (p, "-'`");
- if (before_sep_nr)
- {
- text_append_n (result, p, before_sep_nr);
- p += before_sep_nr;
- }
- if (!*p)
- break;
- if ((strlen (p) > 1) && (!strncmp (p, "``", 2)
- || !strncmp (p, "''", 2)))
- {
- ADD("\"");
- p += 2;
- }
- else if ((strlen (p) > 2) && !strncmp (p, "---", 3))
- {
- ADD("--");
- p += 3;
- }
- else if ((strlen (p) > 1) && !strncmp (p, "--", 2))
- {
- ADD("-");
- p += 2;
- }
- else
- {
- text_append_n (result, p, 1);
- p++;
- }
+ text_append_n (result, p, before_sep_nr);
+ p += before_sep_nr;
+ }
+ if (!*p)
+ break;
+ if ((strlen (p) > 1) && (!strncmp (p, "``", 2)
+ || !strncmp (p, "''", 2)))
+ {
+ ADD("\"");
+ p += 2;
+ }
+ else if ((strlen (p) > 2) && !strncmp (p, "---", 3))
+ {
+ ADD("--");
+ p += 3;
+ }
+ else if ((strlen (p) > 1) && !strncmp (p, "--", 2))
+ {
+ ADD("-");
+ p += 2;
+ }
+ else
+ {
+ text_append_n (result, p, 1);
+ p++;
}
}
-
- if (cased)
- free (cased);
}
+
+ if (cased)
+ free (cased);
}
+ return;
}
+
if (data_cmd)
{
if (nobrace_symbol_text[data_cmd])
@@ -1017,6 +976,49 @@ convert_to_text_internal (const ELEMENT *element,
TEXT_OPTIONS *text_options,
}
destroy_parsed_def (parsed_def);
}
+ else if (element->type == ET_untranslated_def_category_inserted)
+ {
+ ELEMENT *tree = 0;
+ const char *category_text = element->contents.list[0]->text.text;
+ const char *translation_context
+ = lookup_extra_string (element, "translation_context");
+
+ if (text_options->converter)
+ {
+ /*
+ the tree documentlanguage corresponds to the documentlanguage
+ at the place of the tree, but the converter may want to use
+ another documentlanguage, for instance the documentlanguage at
+ the end of the preamble, so we let the converter set it.
+ */
+ tree = cdt_tree (category_text, text_options->converter,
+ 0, translation_context);
+ }
+ else
+ {
+ /* if there is no converter, we use the documentlanguage available
+ in the tree. */
+
+ const char *documentlanguage
+ = lookup_extra_string (element, "documentlanguage");
+
+ /* there is a possibility that some small strings are associated
+ to the tree, and there is no document to get them. However
+ it is very unlikely to have small strings given that the
+ converted tree should be very simple and is a string only,
+ no macro, no file */
+ tree = gdt_tree (category_text, 0, documentlanguage,
+ 0, 0, translation_context);
+ }
+
+ if (tree)
+ {
+ convert_to_text_internal (tree, text_options, result);
+ destroy_element_and_children (tree);
+ }
+ return;
+ }
+
if (element->contents.number)
{
int i;
diff --git a/tp/Texinfo/XS/parsetexi/def.c b/tp/Texinfo/XS/parsetexi/def.c
index d1d29d3f61..5dae396385 100644
--- a/tp/Texinfo/XS/parsetexi/def.c
+++ b/tp/Texinfo/XS/parsetexi/def.c
@@ -372,10 +372,10 @@ parse_def (enum command_id command, ELEMENT *current)
{
e->type = ET_untranslated_def_category_inserted;
e1->type = ET_untranslated;
- add_extra_string_dup (e1, "documentlanguage",
+ add_extra_string_dup (e, "documentlanguage",
global_documentlanguage);
if (def_aliases[i].translation_context)
- add_extra_string_dup (e1, "translation_context",
+ add_extra_string_dup (e, "translation_context",
def_aliases[i].translation_context);
}
diff --git a/tp/t/results/languages/documentlanguage.pl
b/tp/t/results/languages/documentlanguage.pl
index f824bad53b..4647f2ea17 100644
--- a/tp/t/results/languages/documentlanguage.pl
+++ b/tp/t/results/languages/documentlanguage.pl
@@ -427,16 +427,14 @@ $result_trees{'documentlanguage'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'pt',
- 'translation_context' => 'category of methods with
data type in object-oriented programming for @deftypemethod'
- },
'text' => 'Method',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'pt',
+ 'translation_context' => 'category of methods with
data type in object-oriented programming for @deftypemethod'
},
'type' => 'untranslated_def_category_inserted'
},
diff --git a/tp/t/results/languages/documentlanguage_option.pl
b/tp/t/results/languages/documentlanguage_option.pl
index 423c99c5fd..6512ba178b 100644
--- a/tp/t/results/languages/documentlanguage_option.pl
+++ b/tp/t/results/languages/documentlanguage_option.pl
@@ -427,16 +427,14 @@ $result_trees{'documentlanguage_option'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'fr',
- 'translation_context' => 'category of methods with
data type in object-oriented programming for @deftypemethod'
- },
'text' => 'Method',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'fr',
+ 'translation_context' => 'category of methods with
data type in object-oriented programming for @deftypemethod'
},
'type' => 'untranslated_def_category_inserted'
},
diff --git a/tp/t/results/languages/documentlanguage_unknown.pl
b/tp/t/results/languages/documentlanguage_unknown.pl
index 5508cba638..0a220d6b37 100644
--- a/tp/t/results/languages/documentlanguage_unknown.pl
+++ b/tp/t/results/languages/documentlanguage_unknown.pl
@@ -427,16 +427,14 @@ $result_trees{'documentlanguage_unknown'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'unknown',
- 'translation_context' => 'category of methods with
data type in object-oriented programming for @deftypemethod'
- },
'text' => 'Method',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'unknown',
+ 'translation_context' => 'category of methods with
data type in object-oriented programming for @deftypemethod'
},
'type' => 'untranslated_def_category_inserted'
},
diff --git a/tp/t/results/languages/multiple_documentlanguage.pl
b/tp/t/results/languages/multiple_documentlanguage.pl
index 23758c7f06..570c359e30 100644
--- a/tp/t/results/languages/multiple_documentlanguage.pl
+++ b/tp/t/results/languages/multiple_documentlanguage.pl
@@ -70,16 +70,14 @@ $result_trees{'multiple_documentlanguage'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'fr',
- 'translation_context' => 'category of
instance variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'fr',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
@@ -428,16 +426,14 @@ $result_trees{'multiple_documentlanguage'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'fr',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'fr',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
@@ -712,16 +708,14 @@ $result_trees{'multiple_documentlanguage'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'hr',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'hr',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
diff --git a/tp/t/results/languages/multiple_in_preamble.pl
b/tp/t/results/languages/multiple_in_preamble.pl
index 6323a94f7f..74ab6e131a 100644
--- a/tp/t/results/languages/multiple_in_preamble.pl
+++ b/tp/t/results/languages/multiple_in_preamble.pl
@@ -70,16 +70,14 @@ $result_trees{'multiple_in_preamble'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'fr',
- 'translation_context' => 'category of
instance variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'fr',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
@@ -462,16 +460,14 @@ $result_trees{'multiple_in_preamble'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'hr',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'hr',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
@@ -692,16 +688,14 @@ $result_trees{'multiple_in_preamble'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'de',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'de',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
diff --git a/tp/t/results/languages/multiple_in_preamble_before_node.pl
b/tp/t/results/languages/multiple_in_preamble_before_node.pl
index 6da9ef434b..6f1ab8f70d 100644
--- a/tp/t/results/languages/multiple_in_preamble_before_node.pl
+++ b/tp/t/results/languages/multiple_in_preamble_before_node.pl
@@ -70,16 +70,14 @@ $result_trees{'multiple_in_preamble_before_node'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'fr',
- 'translation_context' => 'category of
instance variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'fr',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
@@ -511,16 +509,14 @@ $result_trees{'multiple_in_preamble_before_node'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'de',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'de',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
diff --git a/tp/t/results/languages/multiple_lang_chapters.pl
b/tp/t/results/languages/multiple_lang_chapters.pl
index c990a3f688..04718c5525 100644
--- a/tp/t/results/languages/multiple_lang_chapters.pl
+++ b/tp/t/results/languages/multiple_lang_chapters.pl
@@ -708,16 +708,14 @@ $result_trees{'multiple_lang_chapters'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'ja',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'ja',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
@@ -1012,16 +1010,14 @@ $result_trees{'multiple_lang_chapters'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'en',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'en',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
@@ -1280,16 +1276,14 @@ $result_trees{'multiple_lang_chapters'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'fr_FR',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'fr_FR',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
diff --git a/tp/t/results/languages/multiple_lang_chapters_latex.pl
b/tp/t/results/languages/multiple_lang_chapters_latex.pl
index e614837a42..3eeeb2a59f 100644
--- a/tp/t/results/languages/multiple_lang_chapters_latex.pl
+++ b/tp/t/results/languages/multiple_lang_chapters_latex.pl
@@ -708,16 +708,14 @@ $result_trees{'multiple_lang_chapters_latex'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'ja',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'ja',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
@@ -1012,16 +1010,14 @@ $result_trees{'multiple_lang_chapters_latex'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'en',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'en',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
@@ -1280,16 +1276,14 @@ $result_trees{'multiple_lang_chapters_latex'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'fr_FR',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'fr_FR',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
diff --git a/tp/t/results/languages/multiple_lang_chapters_texi2html.pl
b/tp/t/results/languages/multiple_lang_chapters_texi2html.pl
index 9506b4aa06..3f87a88a2a 100644
--- a/tp/t/results/languages/multiple_lang_chapters_texi2html.pl
+++ b/tp/t/results/languages/multiple_lang_chapters_texi2html.pl
@@ -677,16 +677,14 @@ $result_trees{'multiple_lang_chapters_texi2html'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'ja',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'ja',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
@@ -981,16 +979,14 @@ $result_trees{'multiple_lang_chapters_texi2html'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'en',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'en',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
@@ -1249,16 +1245,14 @@ $result_trees{'multiple_lang_chapters_texi2html'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'fr_FR',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'fr_FR',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
diff --git a/tp/t/results/languages/simple_documentlanguage.pl
b/tp/t/results/languages/simple_documentlanguage.pl
index 132d6d5783..214e1de994 100644
--- a/tp/t/results/languages/simple_documentlanguage.pl
+++ b/tp/t/results/languages/simple_documentlanguage.pl
@@ -117,16 +117,14 @@ $result_trees{'simple_documentlanguage'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'fr',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'fr',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},
diff --git a/tp/t/results/languages/unknown_region.pl
b/tp/t/results/languages/unknown_region.pl
index fe103a507e..ba1cfcfb5e 100644
--- a/tp/t/results/languages/unknown_region.pl
+++ b/tp/t/results/languages/unknown_region.pl
@@ -117,16 +117,14 @@ $result_trees{'unknown_region'} = {
{
'contents' => [
{
- 'extra' => {
- 'documentlanguage' => 'fr_NOWHERE',
- 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
- },
'text' => 'Instance Variable',
'type' => 'untranslated'
}
],
'extra' => {
- 'def_role' => 'category'
+ 'def_role' => 'category',
+ 'documentlanguage' => 'fr_NOWHERE',
+ 'translation_context' => 'category of instance
variables in object-oriented programming for @defivar'
},
'type' => 'untranslated_def_category_inserted'
},