texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[7559] parsetexi update


From: gavinsmith0123
Subject: [7559] parsetexi update
Date: Tue, 20 Dec 2016 20:58:09 +0000 (UTC)

Revision: 7559
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7559
Author:   gavin
Date:     2016-12-20 20:58:09 +0000 (Tue, 20 Dec 2016)
Log Message:
-----------
parsetexi update

Modified Paths:
--------------
    trunk/tp/parsetexi/def.c
    trunk/tp/parsetexi/element_types.c
    trunk/tp/parsetexi/element_types.h
    trunk/tp/parsetexi/element_types.txt
    trunk/tp/parsetexi/end_line.c

Modified: trunk/tp/parsetexi/def.c
===================================================================
--- trunk/tp/parsetexi/def.c    2016-12-20 19:53:01 UTC (rev 7558)
+++ trunk/tp/parsetexi/def.c    2016-12-20 20:58:09 UTC (rev 7559)
@@ -198,13 +198,13 @@
 DEF_ALIAS def_aliases[] = {
   CM_defun, CM_deffn, "Function",
   CM_defmac, CM_deffn, "Macro",
-  CM_defspec, CM_deffn, "{Special Form}",
+  CM_defspec, CM_deffn, "Special Form",
   CM_defvar, CM_defvr, "Variable",
-  CM_defopt, CM_defvr, "{User Option}",
+  CM_defopt, CM_defvr, "User Option",
   CM_deftypefun, CM_deftypefn, "Function",
   CM_deftypevar, CM_deftypevr, "Variable",
-  CM_defivar, CM_defcv, "{Instance Variable}",
-  CM_deftypeivar, CM_deftypecv, "{Instance Variable}",
+  CM_defivar, CM_defcv, "Instance Variable",
+  CM_deftypeivar, CM_deftypecv, "Instance Variable",
   CM_defmethod, CM_defop, "Method",
   CM_deftypemethod, CM_deftypeop, "Method",
   0, 0, 0
@@ -302,30 +302,21 @@
       original_command = command;
       command = def_aliases[i].command;
 
-      /* TODO: Get the gettext translation of "Function" etc.  The result of
-         this is actually a general Texinfo tree, instead of just a string. */
-      /* tree = gdt (category); */
-
-      if (*category != '{')
+      /* Used when category text has a space in it. */
+      e = new_element (ET_bracketed);
+      insert_into_contents (arg_line, e, 0);
+      e->parent = 0;
+      e->parent_type = route_not_in_tree;
+      e1 = new_element (ET_NONE);
+      text_append_n (&e1->text, category, strlen (category));
+      add_to_element_contents (e, e1);
+      if (global_documentlanguage && *global_documentlanguage)
         {
-          e = new_element (ET_NONE);
-          text_append (&e->text, category);
-          insert_into_contents (arg_line, e, 0);
-          e->parent = 0;
-          e->parent_type = route_not_in_tree;
+          e1->type = ET_untranslated;
+          add_extra_string (e1, "documentlanguage",
+                            global_documentlanguage);
         }
-      else
-        {
-          /* Used when category text has a space in it. */
-          e = new_element (ET_bracketed);
-          insert_into_contents (arg_line, e, 0);
-          e->parent = 0;
-          e->parent_type = route_not_in_tree;
-          e1 = new_element (ET_NONE);
-          text_append_n (&e1->text, category + 1, strlen (category) - 2);
-          add_to_element_contents (e, e1);
-          e1->parent_type = route_not_in_tree;
-        }
+      e1->parent_type = route_not_in_tree;
 
       e = new_element (ET_NONE);
       text_append_n (&e->text, " ", 1);

Modified: trunk/tp/parsetexi/element_types.c
===================================================================
--- trunk/tp/parsetexi/element_types.c  2016-12-20 19:53:01 UTC (rev 7558)
+++ trunk/tp/parsetexi/element_types.c  2016-12-20 20:58:09 UTC (rev 7559)
@@ -61,5 +61,6 @@
 "elided",
 "elided_block",
 "delimiter",
+"untranslated",
 
 };

Modified: trunk/tp/parsetexi/element_types.h
===================================================================
--- trunk/tp/parsetexi/element_types.h  2016-12-20 19:53:01 UTC (rev 7558)
+++ trunk/tp/parsetexi/element_types.h  2016-12-20 20:58:09 UTC (rev 7559)
@@ -62,6 +62,7 @@
 ET_elided,
 ET_elided_block,
 ET_delimiter,
+ET_untranslated,
 };
 
 extern char *element_type_names[];

Modified: trunk/tp/parsetexi/element_types.txt
===================================================================
--- trunk/tp/parsetexi/element_types.txt        2016-12-20 19:53:01 UTC (rev 
7558)
+++ trunk/tp/parsetexi/element_types.txt        2016-12-20 20:58:09 UTC (rev 
7559)
@@ -91,3 +91,6 @@
 # for def commands
 delimiter
 
+# for inserted text in def commands
+untranslated
+

Modified: trunk/tp/parsetexi/end_line.c
===================================================================
--- trunk/tp/parsetexi/end_line.c       2016-12-20 19:53:01 UTC (rev 7558)
+++ trunk/tp/parsetexi/end_line.c       2016-12-20 20:58:09 UTC (rev 7559)
@@ -1681,6 +1681,7 @@
               if (*p == '_')
                 {
                   q = p + 1;
+                  p = q;
                   /* Language code should be of the form LL_CC, language code
                      followed by country code. */
                   while (isalpha (*p))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]