Subversion Repositories Scribus

Rev

Rev 4430 | Rev 4546 | 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
9
        copyright            : (C) 2005 by Craig Bradney       
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
#ifndef COMMONSTRINGS_H
23
#define COMMONSTRINGS_H
24
 
25
#include <qobject.h>
26
#include <qstring.h>
2969 craig 27
#include "scribusapi.h"
2953 cbradney 28
 
29
/*
30
 * A simple common strings class to reduce the string count and ease
31
 * the translation process a little.
32
 *  - Contains untranslated and translated versions of the strings to
33
 *    help with reduction of future reliance of translated strings in
34
 *    "real" code
35
 *  - Currently stores GUI strings such as &OK and its translated
36
 *    version, but not the string without the &.
37
 *  - BE CAREFUL with context. Simple strings should be stored here
38
 *    that are obviously a verb or a noun, and if multiple contexts
39
 *    don't have different translations relating to verb/noun/gender
40
 *    in some languages. This is the reason basic words have been
41
 *    done initially.
42
 */
43
 
2969 craig 44
class SCRIBUS_API CommonStrings : public QObject
2953 cbradney 45
{
46
        Q_OBJECT
47
public:
3367 cbradney 48
        CommonStrings();
4538 cbradney 49
 
50
        /**
51
         * Return the translated Page Set string if given the "untranslated" one
52
         * @param  "untranslated" string
53
         * @return translated string
54
         */
55
        static const QString& translatePageSetString(const QString &);
56
        /**
57
         * Return the translated Page Set Location string if given the "untranslated" one
58
         * @param  "untranslated" string
59
         * @return translated string
60
         */
61
        static const QString& translatePageSetLocString(const QString &);
62
        /**
63
         * Return the untranslated Page Set string if given the translated one
64
         * @param  translated string
65
         * @return "untranslated" string
66
         */
67
        static const QString& untranslatePageSetString(const QString &);
68
        /**
69
         * Return the untranslated Page Set Location string if given the translated one
70
         * @param  translated string
71
         * @return "untranslated" string
72
         */
73
        static const QString& untranslatePageSetLocString(const QString &);
2953 cbradney 74
        static void languageChange();
75
        static QString _Apply;
76
        static QString tr_Apply;
77
        static QString _Cancel;
78
        static QString tr_Cancel;
79
        static QString None;
80
        static QString trNone;
81
        static QString _OK;
82
        static QString tr_OK;
83
        static QString _Save;
3510 cbradney 84
        static QString tr_Save;
85
        static QString Warning;
86
        static QString trWarning;
4538 cbradney 87
 
88
        //Page Sets
89
        static QString pageSet1;
90
        static QString pageSet2;
91
        static QString pageSet3;
92
        static QString pageSet4;
93
        static QString trPageSet1;
94
        static QString trPageSet2;
95
        static QString trPageSet3;
96
        static QString trPageSet4;
97
        static QString pageLocLeft;
98
        static QString pageLocMiddle;
99
        static QString pageLocMiddleLeft;
100
        static QString pageLocMiddleRight;
101
        static QString pageLocRight;
102
        static QString trPageLocLeft;
103
        static QString trPageLocMiddle;
104
        static QString trPageLocMiddleLeft;
105
        static QString trPageLocMiddleRight;
106
        static QString trPageLocRight;
2953 cbradney 107
};
108
 
109
#endif