]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Support for Serbian and Uzbek locales in C#.
authorBruno Haible <bruno@clisp.org>
Mon, 15 Mar 2004 11:48:59 +0000 (11:48 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:11:50 +0000 (12:11 +0200)
gettext-runtime/m4/ChangeLog
gettext-tools/src/ChangeLog
gettext-tools/src/read-csharp.c
gettext-tools/src/write-csharp.c

index a70f857e3c4c4b9b9059da91215eeee7c05bd62c..30b7ba016257c0cde249de1706c059d827b4f76c 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-02  Bruno Haible  <bruno@clisp.org>
+
+       * po.m4 (AM_POSTPROCESS_PO_MAKEFILE): For RESOURCESDLLFILES and
+       CSHARPCATALOGS, extend the lang -> frobbedlang mapping so as to support
+       Serbian and Uzbek locales.
+
 2004-02-18  Bruno Haible  <bruno@clisp.org>
 
        * xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
index 4808f22de232c1232fd418314ee5fe2c9804e7dd..0984eb0996444b73f3c71863b02d7758e210e11a 100644 (file)
@@ -1,3 +1,10 @@
+2004-03-02  Bruno Haible  <bruno@clisp.org>
+
+       * read-csharp.c (msgdomain_read_csharp): Extend the lang -> frobbedlang
+       mapping so as to support Serbian and Uzbek locales.
+       * write-csharp.c (msgdomain_write_csharp): Likewise.
+       Reported by Jorn Baayen <jbaayen@dds.nl>.
+
 2004-02-27  Bruno Haible  <bruno@clisp.org>
 
        * plural-table.c (plural_table): Add an entry about Serbian.
index f7b427e0c188ad34d6ec5075f1249b8e4f915894..9861e52fe975bcef34368290aa43627b071c96ff 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading C# satellite assemblies.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003-2004 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -110,6 +110,26 @@ msgdomain_read_csharp (const char *resource_name, const char *locale_name,
     for (p = culture_name; *p != '\0'; p++)
       if (*p == '_')
        *p = '-';
+    if (strncmp (culture_name, "sr-CS", 5) == 0)
+      memcpy (culture_name, "sr-SP", 5);
+    p = strchr (culture_name, '@');
+    if (p != NULL)
+      {
+       if (strcmp (p, "@latin") == 0)
+         strcpy (p, "-Latn");
+       else if (strcmp (p, "@cyrillic") == 0)
+         strcpy (p, "-Cyrl");
+      }
+    if (strcmp (culture_name, "sr-SP") == 0)
+      {
+       free (culture_name);
+       culture_name = xstrdup ("sr-SP-Latn");
+      }
+    else if (strcmp (culture_name, "uz-UZ") == 0)
+      {
+       free (culture_name);
+       culture_name = xstrdup ("uz-UZ-Latn");
+      }
   }
 
   /* Prepare arguments.  */
index 6e4e8030f0b9fe8fe383c1e0365b56123fcdfc39..e417f18ad533ced5c7e59d1a70556f7714b6ee60 100644 (file)
@@ -1,5 +1,5 @@
 /* Writing C# satellite assemblies.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003-2004 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -688,7 +688,28 @@ msgdomain_write_csharp (message_list_ty *mlp, const char *canon_encoding,
     for (p = culture_name; *p != '\0'; p++)
       if (*p == '_')
        *p = '-';
+    if (strncmp (culture_name, "sr-CS", 5) == 0)
+      memcpy (culture_name, "sr-SP", 5);
+    p = strchr (culture_name, '@');
+    if (p != NULL)
+      {
+       if (strcmp (p, "@latin") == 0)
+         strcpy (p, "-Latn");
+       else if (strcmp (p, "@cyrillic") == 0)
+         strcpy (p, "-Cyrl");
+      }
+    if (strcmp (culture_name, "sr-SP") == 0)
+      {
+       free (culture_name);
+       culture_name = xstrdup ("sr-SP-Latn");
+      }
+    else if (strcmp (culture_name, "uz-UZ") == 0)
+      {
+       free (culture_name);
+       culture_name = xstrdup ("uz-UZ-Latn");
+      }
   }
+  
 
   /* Compute the output file name.  This code must be kept consistent with
      intl.cs, function GetSatelliteAssembly().  */