Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
OConsts |
|
| 0.0;0 |
1 | /************************************************************************** | |
2 | OmegaT - Computer Assisted Translation (CAT) tool | |
3 | with fuzzy matching, translation memory, keyword search, | |
4 | glossaries, and translation leveraging into updated projects. | |
5 | ||
6 | Copyright (C) 2000-2006 Keith Godfrey and Maxym Mykhalchuk | |
7 | 2007 Zoltan Bartko | |
8 | 2009 Didier Briel | |
9 | Home page: http://www.omegat.org/ | |
10 | Support center: http://groups.yahoo.com/group/OmegaT/ | |
11 | ||
12 | This program is free software; you can redistribute it and/or modify | |
13 | it under the terms of the GNU General Public License as published by | |
14 | the Free Software Foundation; either version 2 of the License, or | |
15 | (at your option) any later version. | |
16 | ||
17 | This program is distributed in the hope that it will be useful, | |
18 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | GNU General Public License for more details. | |
21 | ||
22 | You should have received a copy of the GNU General Public License | |
23 | along with this program; if not, write to the Free Software | |
24 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
25 | **************************************************************************/ | |
26 | ||
27 | package org.omegat.util; | |
28 | ||
29 | import java.io.File; | |
30 | ||
31 | /** | |
32 | * OmegaT-wide Constants. | |
33 | * <p> | |
34 | * // TODO Note: Some constants that are used only in a single class, or are | |
35 | * more appropriate in another class (e.g. preference names) are moved in | |
36 | * appropriate class definitions. | |
37 | * | |
38 | * @author Keith Godfrey | |
39 | * @author Maxym Mykhalchuk | |
40 | * @author Zoltan Bartko (bartkozoltan@bartkozoltan.com) | |
41 | * @author Didier Briel | |
42 | */ | |
43 | 0 | public class OConsts { |
44 | ||
45 | // project file consts | |
46 | /** Project Filename */ | |
47 | public static final String FILE_PROJECT = "omegat.project"; | |
48 | /** Project Version */ | |
49 | public static final String PROJ_CUR_VERSION = "1.0"; | |
50 | ||
51 | public static final String TMX_EXTENSION = ".tmx"; | |
52 | public static final String OMEGAT_TMX = "-omegat"; | |
53 | public static final String LEVEL1_TMX = "-level1"; | |
54 | public static final String LEVEL2_TMX = "-level2"; | |
55 | ||
56 | public static final String TMW_EXTENSION = ".wf"; // for wordfast | |
57 | ||
58 | // help | |
59 | public static final String HELP_HOME = "index.html"; | |
60 | public static final String HELP_INSTANT_START = "instantStartGuideNoTOC.html"; | |
61 | public static final String HELP_DIR = "docs"; | |
62 | public static final String HELP_LANG_INDEX = "languageIndex.html"; | |
63 | ||
64 | // status file consts | |
65 | public static final String STATUS_EXTENSION = "project_save.tmx"; | |
66 | public static final String STATUS_RECOVER_EXTENSION = ".recover"; | |
67 | public static final String BACKUP_EXTENSION = ".backup"; | |
68 | ||
69 | /** Project subfolder for source files default name. */ | |
70 | public static final String DEFAULT_SOURCE = "source"; | |
71 | /** Project subfolder for translated files default name. */ | |
72 | public static final String DEFAULT_TARGET = "target"; | |
73 | /** Project subfolder for glossaries default name. */ | |
74 | public static final String DEFAULT_GLOSSARY = "glossary"; | |
75 | /** Project subfolder for legacy translation memories default name. */ | |
76 | public static final String DEFAULT_TM = "tm"; | |
77 | /** Project subfolder for dictionaries default name. */ | |
78 | public static final String DEFAULT_DICT = "dictionary"; | |
79 | /** Project subfolder for project's translation memory. */ | |
80 | public static final String DEFAULT_INTERNAL = "omegat"; | |
81 | ||
82 | /** | |
83 | * A marker that tells OmegaT that project's subfolder has default location. | |
84 | */ | |
85 | public static final String DEFAULT_FOLDER_MARKER = "__DEFAULT__"; | |
86 | ||
87 | /** | |
88 | * The name of the file with project statistics: segments, words, chars | |
89 | * count. | |
90 | */ | |
91 | public static final String STATS_FILENAME = "project_stats.txt"; | |
92 | ||
93 | /** The name of the file with project match statistics. */ | |
94 | public static final String STATS_MATCH_FILENAME = "project_stats_match.txt"; | |
95 | ||
96 | /** The name of the file with the ignored words: one ignored word per line */ | |
97 | public static final String IGNORED_WORD_LIST_FILE_NAME = "ignored_words.txt"; | |
98 | ||
99 | /** The name of the file with the correct (learned) words: one word per line */ | |
100 | public static final String LEARNED_WORD_LIST_FILE_NAME = "learned_words.txt"; | |
101 | ||
102 | /** The name of the spell checking library */ | |
103 | public static final String SPELLCHECKER_LIBRARY_NAME = "hunspell"; | |
104 | ||
105 | /** the native library directory */ | |
106 | public static final String NATIVE_LIBRARY_DIR = "native"; | |
107 | ||
108 | /** affix file extension */ | |
109 | public static final String SC_AFFIX_EXTENSION = ".aff"; | |
110 | ||
111 | /** dictionary file extension */ | |
112 | public static final String SC_DICTIONARY_EXTENSION = ".dic"; | |
113 | ||
114 | /** The name of the file with the source exported segment */ | |
115 | public static final String SOURCE_EXPORT = "source.txt"; | |
116 | /** The name of the file with the target exported segment */ | |
117 | public static final String TARGET_EXPORT = "target.txt"; | |
118 | /** The name of the file with the exported selection */ | |
119 | public static final String SELECTION_EXPORT = "selection.txt"; | |
120 | ||
121 | /** The smallest threshold to detect a fuzzy match string */ | |
122 | public static final int FUZZY_MATCH_THRESHOLD = 30; | |
123 | ||
124 | public static final int ST_MAX_SEARCH_RESULTS = 1000; | |
125 | ||
126 | public static final String TF_SRC_FONT_NAME = "source_font"; | |
127 | public static final String TF_SRC_FONT_SIZE = "source_font_size"; | |
128 | public static final String TF_FONT_DEFAULT = "Dialog"; | |
129 | public static final int TF_FONT_SIZE_DEFAULT = 12; | |
130 | ||
131 | public static final String XB_COMMENT_SHORTCUT = "!comment"; | |
132 | ||
133 | /** Number of fuzzy matches to display */ | |
134 | public static final int MAX_NEAR_STRINGS = 5; | |
135 | /** Number of fuzzy matches to store */ | |
136 | public static final int MAX_STORED_NEAR_STRINGS = 50; | |
137 | ||
138 | /** | |
139 | * The limit of bytes that AbstractFilter.isFileSupported may read. 8k (8192 | |
140 | * bytes) for now, as this is the default buffer size for BufferedReader. | |
141 | */ | |
142 | public static final int READ_AHEAD_LIMIT = 8192; | |
143 | ||
144 | /** | |
145 | * The name of the OmegaT Jar file. It is used to calculate the installation | |
146 | * directory. | |
147 | */ | |
148 | public static final String APPLICATION_JAR = "OmegaT.jar"; | |
149 | ||
150 | /** | |
151 | * Application debug classpath. It is used to calculate the installation | |
152 | * directory (in case of debugging -- the sources directory). | |
153 | */ | |
154 | 44115777 | public static final String DEBUG_CLASSPATH = "build" + File.separator + "classes"; |
155 | ||
156 | /** Encoding: "UTF-8". */ | |
157 | public static final String UTF8 = "UTF-8"; | |
158 | ||
159 | public static final String REMOTE_SC_DICTIONARY_LIST_LOCATION = "http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries/"; | |
160 | ||
161 | 44115777 | public static final String segmentStartString = StaticUtils.rtrim(OStrings.getSegmentStartMarker()); |
162 | 44115777 | public static final String segmentStartStringFull = OStrings.getSegmentStartMarker(); |
163 | 44115777 | public static final String segmentEndString = StaticUtils.ltrim(OStrings.getSegmentEndMarker()); |
164 | 44115777 | public static final String segmentEndStringFull = OStrings.getSegmentEndMarker(); |
165 | ||
166 | } |