mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-23 08:07:07 +00:00
Make nfont face name localization work. Add English and Swedish translations.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17061 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
958313492a
commit
9a87aa2b4f
6 changed files with 136 additions and 2 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
2003-06-28 15:27 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/art/ftfont.m: Use a specific table when translating
|
||||
face names. Add a list of standard face names so make_strings can
|
||||
generate .strings files.
|
||||
|
||||
* Source/GNUmakefile: Add nfontFaceNames.strings to the list of
|
||||
localized resources. Set the language list to English and Swedish.
|
||||
|
||||
* Source/GNUmakefile.preamble: Add a quick hack to make make_strings
|
||||
pick up the .m files in all subprojects.
|
||||
|
||||
* Source/English.lproj/nfontFaceNames.strings,
|
||||
Source/Swedish.lproj/nfontFaceNames.strings: Add English (dummy) and
|
||||
Swedish translations of the nfont face names.
|
||||
|
||||
2003-06-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Tools/gpbs.m: Removed unused methods no longer in protocol.
|
||||
|
|
32
Source/English.lproj/nfontFaceNames.strings
Normal file
32
Source/English.lproj/nfontFaceNames.strings
Normal file
|
@ -0,0 +1,32 @@
|
|||
/***
|
||||
English.lproj/nfontFaceNames.strings
|
||||
updated by make_strings 2003-06-28 15:21:29 +0200
|
||||
add comments above this one
|
||||
***/
|
||||
|
||||
|
||||
/*** Strings from art/ftfont.m ***/
|
||||
/* File: art/ftfont.m:183 */
|
||||
"Bold" = "Bold";
|
||||
/* File: art/ftfont.m:189 */
|
||||
"Bold Italic" = "Bold Italic";
|
||||
/* File: art/ftfont.m:190 */
|
||||
"Bold Oblique" = "Bold Oblique";
|
||||
/* File: art/ftfont.m:177 */
|
||||
"Book" = "Book";
|
||||
/* File: art/ftfont.m:181 */
|
||||
"Demi" = "Demi";
|
||||
/* File: art/ftfont.m:182 */
|
||||
"Demibold" = "Demibold";
|
||||
/* File: art/ftfont.m:184 */
|
||||
"Heavy" = "Heavy";
|
||||
/* File: art/ftfont.m:186 */
|
||||
"Italic" = "Italic";
|
||||
/* File: art/ftfont.m:180 */
|
||||
"Medium" = "Medium";
|
||||
/* File: art/ftfont.m:187 */
|
||||
"Oblique" = "Oblique";
|
||||
/* File: art/ftfont.m:178 */
|
||||
"Regular" = "Regular";
|
||||
/* File: art/ftfont.m:179 */
|
||||
"Roman" = "Roman";
|
|
@ -47,6 +47,10 @@ libgnustep-$(BACKEND_NAME)_OBJC_FILES=GSBackend.m
|
|||
|
||||
libgnustep-$(BACKEND_NAME)_PRINCIPAL_CLASS=GSBackend
|
||||
|
||||
libgnustep-$(BACKEND_NAME)_LOCALIZED_RESOURCE_FILES=nfontFaceNames.strings
|
||||
|
||||
libgnustep-$(BACKEND_NAME)_LANGUAGES=English Swedish
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
|
||||
ifeq ($(BACKEND_BUNDLE),)
|
||||
|
|
|
@ -55,3 +55,10 @@ ifeq ($(BACKEND_BUNDLE),)
|
|||
libgnustep-$(BACKEND_NAME)_LIBRARIES_DEPEND_UPON = $(GRAPHIC_LIBS)
|
||||
endif
|
||||
|
||||
|
||||
#
|
||||
# The */*.m is a hack to get make_strings to pull in all the .m files in all
|
||||
# sub-directories. Even if we aren't including a directory in the build, it is
|
||||
# important that the strings files contains all strings.
|
||||
#
|
||||
MAKE_STRINGS_OPTIONS = --aggressive-match --aggressive-remove */*.m
|
||||
|
|
50
Source/Swedish.lproj/nfontFaceNames.strings
Normal file
50
Source/Swedish.lproj/nfontFaceNames.strings
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
Translated by Alexander Malmberg.
|
||||
|
||||
Jag kan egentligen inte mycket svensk typografijargong; nagon som kan
|
||||
borde dubbel-kolla oversattningen. (2003-06-28)
|
||||
*/
|
||||
|
||||
/***
|
||||
Swedish.lproj/nfontFaceNames.strings
|
||||
updated by make_strings 2003-06-28 15:21:29 +0200
|
||||
add comments above this one
|
||||
***/
|
||||
|
||||
|
||||
/*** Unmatched/untranslated keys ***/
|
||||
|
||||
/* File: art/ftfont.m:177 */
|
||||
/* Flag: untranslated */
|
||||
"Book" = "Book";
|
||||
|
||||
/* File: art/ftfont.m:179 */
|
||||
/* Flag: untranslated */
|
||||
"Roman" = "Roman";
|
||||
|
||||
/* File: art/ftfont.m:180 */
|
||||
/* Flag: untranslated */
|
||||
"Medium" = "Medium";
|
||||
|
||||
/* File: art/ftfont.m:184 */
|
||||
/* Flag: untranslated */
|
||||
"Heavy" = "Heavy";
|
||||
|
||||
|
||||
/*** Strings from art/ftfont.m ***/
|
||||
/* File: art/ftfont.m:183 */
|
||||
"Bold" = "Fet";
|
||||
/* File: art/ftfont.m:189 */
|
||||
"Bold Italic" = "Fet Kursiv";
|
||||
/* File: art/ftfont.m:190 */
|
||||
"Bold Oblique" = "Fet Kursiv";
|
||||
/* File: art/ftfont.m:181 */
|
||||
"Demi" = "Halvfet";
|
||||
/* File: art/ftfont.m:182 */
|
||||
"Demibold" = "Halvfet";
|
||||
/* File: art/ftfont.m:186 */
|
||||
"Italic" = "Kursiv";
|
||||
/* File: art/ftfont.m:187 */
|
||||
"Oblique" = "Kursiv";
|
||||
/* File: art/ftfont.m:178 */
|
||||
"Regular" = "Vanlig";
|
|
@ -167,6 +167,31 @@ static NSMutableSet *families_seen, *families_pending;
|
|||
@end
|
||||
|
||||
|
||||
#if 0
|
||||
|
||||
/*
|
||||
This is a list of "standard" face names. It is here so make_strings can pick
|
||||
it up and generate .strings files with them.
|
||||
*/
|
||||
|
||||
NSLocalizedStringFromTable(@"Book", @"nfontFaceNames", @"")
|
||||
NSLocalizedStringFromTable(@"Regular", @"nfontFaceNames", @"")
|
||||
NSLocalizedStringFromTable(@"Roman", @"nfontFaceNames", @"")
|
||||
NSLocalizedStringFromTable(@"Medium", @"nfontFaceNames", @"")
|
||||
NSLocalizedStringFromTable(@"Demi", @"nfontFaceNames", @"")
|
||||
NSLocalizedStringFromTable(@"Demibold", @"nfontFaceNames", @"")
|
||||
NSLocalizedStringFromTable(@"Bold", @"nfontFaceNames", @"")
|
||||
NSLocalizedStringFromTable(@"Heavy", @"nfontFaceNames", @"")
|
||||
|
||||
NSLocalizedStringFromTable(@"Italic", @"nfontFaceNames", @"")
|
||||
NSLocalizedStringFromTable(@"Oblique", @"nfontFaceNames", @"")
|
||||
|
||||
NSLocalizedStringFromTable(@"Bold Italic", @"nfontFaceNames", @"")
|
||||
NSLocalizedStringFromTable(@"Bold Oblique", @"nfontFaceNames", @"")
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static int traits_from_string(NSString *s, unsigned int *traits, unsigned int *weight)
|
||||
{
|
||||
static struct
|
||||
|
@ -319,7 +344,7 @@ static void add_face(NSString *family, int family_weight,
|
|||
translate individually? */
|
||||
/* TODO: Need to define the strings somewhere, and make sure the
|
||||
strings files get created. */
|
||||
faceName = [NSLocalizedStringFromTableInBundle(faceName,nil,
|
||||
faceName = [NSLocalizedStringFromTableInBundle(faceName,@"nfontFaceNames",
|
||||
[NSBundle bundleForClass: [fi class]],nil) copy];
|
||||
fi->faceName = faceName;
|
||||
}
|
||||
|
@ -329,7 +354,7 @@ static void add_face(NSString *family, int family_weight,
|
|||
int split = traits_from_string(family,&dummy,&dummy);
|
||||
rawFaceName = faceName = [family substringFromIndex: split];
|
||||
family = [family substringToIndex: split];
|
||||
faceName = [NSLocalizedStringFromTableInBundle(faceName,nil,
|
||||
faceName = [NSLocalizedStringFromTableInBundle(faceName,@"nfontFaceNames",
|
||||
[NSBundle bundleForClass: [fi class]],nil) copy];
|
||||
fi->faceName = faceName;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue