Subversion Repositories Scribus

Rev

Rev 4729 | Rev 5367 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4430 cbradney 1
/*
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
6
*/
2953 cbradney 7
/***************************************************************************
8
        begin                : Aug 2005
4546 subik 9
        copyright            : (C) 2005 by Craig Bradney
2953 cbradney 10
        email                : cbradney@zip.com.au
11
***************************************************************************/
12
 
13
/***************************************************************************
14
*                                                                         *
4026 craig 15
*   ScMW program is free software; you can redistribute it and/or modify  *
2953 cbradney 16
*   it under the terms of the GNU General Public License as published by  *
17
*   the Free Software Foundation; either version 2 of the License, or     *
18
*   (at your option) any later version.                                   *
19
*                                                                         *
20
***************************************************************************/
21
 
22
#include "commonstrings.h"
2955 fschmid 23
#include "commonstrings.moc"
2953 cbradney 24
 
25
QString CommonStrings::_Apply      = "";
26
QString CommonStrings::tr_Apply    = "";
27
QString CommonStrings::_Cancel     = "";
28
QString CommonStrings::tr_Cancel   = "";
29
QString CommonStrings::None        = "";
4729 subik 30
QString CommonStrings::NoneColor   = "";
2953 cbradney 31
QString CommonStrings::_OK         = "";
32
QString CommonStrings::tr_OK       = "";
33
QString CommonStrings::_Save       = "";
34
QString CommonStrings::tr_Save     = "";
3510 cbradney 35
QString CommonStrings::Warning     = "";
36
QString CommonStrings::trWarning   = "";
2953 cbradney 37
 
4555 cbradney 38
QString CommonStrings::customPageSize = "";
39
QString CommonStrings::trCustomPageSize = "";
40
 
4538 cbradney 41
QString CommonStrings::pageSet1    = "";
42
QString CommonStrings::pageSet2    = "";
43
QString CommonStrings::pageSet3    = "";
44
QString CommonStrings::pageSet4    = "";
45
QString CommonStrings::trPageSet1  = "";
46
QString CommonStrings::trPageSet2  = "";
47
QString CommonStrings::trPageSet3  = "";
48
QString CommonStrings::trPageSet4  = "";
49
QString CommonStrings::pageLocLeft          = "";
50
QString CommonStrings::pageLocMiddle        = "";
51
QString CommonStrings::pageLocMiddleLeft    = "";
52
QString CommonStrings::pageLocMiddleRight   = "";
53
QString CommonStrings::pageLocRight         = "";
54
QString CommonStrings::trPageLocLeft        = "";
55
QString CommonStrings::trPageLocMiddle      = "";
56
QString CommonStrings::trPageLocMiddleLeft  = "";
57
QString CommonStrings::trPageLocMiddleRight = "";
58
QString CommonStrings::trPageLocRight       = "";
59
 
5364 cbradney 60
QString CommonStrings::monday="", CommonStrings::tuesday="", CommonStrings::wednesday="";
61
QString CommonStrings::thursday="", CommonStrings::friday="", CommonStrings::saturday="", CommonStrings::sunday="";
62
QString CommonStrings::january="", CommonStrings::february="", CommonStrings::march="";
63
QString CommonStrings::april="", CommonStrings::may="", CommonStrings::june="";
64
QString CommonStrings::july="", CommonStrings::august="", CommonStrings::september="";
65
QString CommonStrings::october="", CommonStrings::november="", CommonStrings::december="";
66
 
3367 cbradney 67
CommonStrings::CommonStrings()
68
{
69
        languageChange();
70
}
71
 
4538 cbradney 72
const QString& CommonStrings::translatePageSetString(const QString &untrString)
73
{
74
        if (untrString==pageSet1)
75
                return trPageSet1;
76
        if (untrString==pageSet2)
77
                return trPageSet2;
78
        if (untrString==pageSet3)
79
                return trPageSet3;
80
        if (untrString==pageSet4)
81
                return trPageSet4;
82
        return untrString;
83
}
84
 
85
const QString& CommonStrings::translatePageSetLocString(const QString &untrString)
86
{
87
        if (untrString==pageLocLeft)
88
                return trPageLocLeft;
89
        if (untrString==pageLocMiddle)
90
                return trPageLocMiddle;
91
        if (untrString==pageLocMiddleLeft)
92
                return trPageLocMiddleLeft;
93
        if (untrString==pageLocMiddleRight)
94
                return trPageLocMiddleRight;
95
        if (untrString==pageLocRight)
96
                return trPageLocRight;
97
        return untrString;
98
}
99
 
100
const QString& CommonStrings::untranslatePageSetString(const QString &trString)
101
{
102
        if (trString==trPageSet1)
103
                return pageSet1;
104
        if (trString==trPageSet2)
105
                return pageSet2;
106
        if (trString==trPageSet3)
107
                return pageSet3;
108
        if (trString==trPageSet4)
109
                return pageSet4;
110
        return trString;
111
}
112
 
113
const QString& CommonStrings::untranslatePageSetLocString(const QString &trString)
114
{
115
        if (trString==trPageLocLeft)
116
                return pageLocLeft;
117
        if (trString==trPageLocMiddle)
118
                return pageLocMiddle;
119
        if (trString==trPageLocMiddleLeft)
120
                return pageLocMiddleLeft;
121
        if (trString==trPageLocMiddleRight)
122
                return pageLocMiddleRight;
123
        if (trString==trPageLocRight)
124
                return pageLocRight;
125
        return trString;
126
}
127
 
2953 cbradney 128
void CommonStrings::languageChange()
129
{
3510 cbradney 130
        CommonStrings::_Apply     = "&Apply";
131
        CommonStrings::tr_Apply   = tr( "&Apply" );
4546 subik 132
 
2953 cbradney 133
        CommonStrings::_Cancel    = "&Cancel";
134
        CommonStrings::tr_Cancel  = tr( "&Cancel" );
4546 subik 135
 
2953 cbradney 136
        CommonStrings::None       = "None";
4729 subik 137
        CommonStrings::NoneColor  = tr("None", "color name");
4546 subik 138
 
2953 cbradney 139
        CommonStrings::_OK        = "&OK";
140
        CommonStrings::tr_OK      = tr( "&OK" );
4546 subik 141
 
2953 cbradney 142
        CommonStrings::_Save      = "&Save";
3367 cbradney 143
        CommonStrings::tr_Save    = tr( "&Save" );
4546 subik 144
 
3510 cbradney 145
        CommonStrings::Warning    = "Warning";
146
        CommonStrings::trWarning  = tr( "Warning" );
4729 subik 147
 
4555 cbradney 148
        CommonStrings::customPageSize = "Custom";
149
        CommonStrings::trCustomPageSize = tr( "Custom", "CommonStrings, custom page size" );
4729 subik 150
 
4538 cbradney 151
        CommonStrings::pageSet1    = "Single Page";
152
        CommonStrings::pageSet2    = "Double Sided";
153
        CommonStrings::pageSet3    = "3-Fold";
154
        CommonStrings::pageSet4    = "4-Fold";
155
        CommonStrings::trPageSet1  = tr( "Single Page" );
156
        CommonStrings::trPageSet2  = tr( "Double Sided" );
157
        CommonStrings::trPageSet3  = tr( "3-Fold" );
158
        CommonStrings::trPageSet4  = tr( "4-Fold" );
4729 subik 159
 
4538 cbradney 160
        CommonStrings::pageLocLeft          = "Left Page";
161
        CommonStrings::pageLocMiddle        = "Middle";
162
        CommonStrings::pageLocMiddleLeft    = "Middle Left";
163
        CommonStrings::pageLocMiddleRight   = "Middle Right";
164
        CommonStrings::pageLocRight         = "Right Page";
165
        CommonStrings::trPageLocLeft        = tr( "Left Page" );
166
        CommonStrings::trPageLocMiddle      = tr( "Middle" );
167
        CommonStrings::trPageLocMiddleLeft  = tr( "Middle Left" );
168
        CommonStrings::trPageLocMiddleRight = tr( "Middle Right" );
169
        CommonStrings::trPageLocRight       = tr( "Right Page" );
5364 cbradney 170
 
171
        CommonStrings::monday= tr( "Monday");
172
        CommonStrings::tuesday = tr("Tuesday");
173
        CommonStrings::wednesday = tr("Wednesday");
174
        CommonStrings::thursday = tr("Thursday");
175
        CommonStrings::friday = tr("Friday");
176
        CommonStrings::saturday = tr("Saturday");
177
        CommonStrings::sunday = tr("Sunday");
178
        CommonStrings::january = tr("January");
179
        CommonStrings::february = tr("February");
180
        CommonStrings::march = tr("March");
181
        CommonStrings::april = tr("April");
182
        CommonStrings::may = tr("May");
183
        CommonStrings::june = tr("June");
184
        CommonStrings::july = tr("July");
185
        CommonStrings::august = tr("August");
186
        CommonStrings::september = tr("September");
187
        CommonStrings::october = tr("October");
188
        CommonStrings::november = tr("November");
189
        CommonStrings::december = tr("December");
2953 cbradney 190
}
191