Package org.omegat.util
Class OStrings
java.lang.Object
org.omegat.util.OStrings
Localizable strings.
Please don't add any new strings here, use getString method.
This class still has so many strings for legacy reasons only.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringFor custom deployments of OmegaT that need to be distinguishable from "stock" OmegaTstatic final booleanIndicates whether this is a "beta" (or "latest") version or a "standard" version.static final StringRepository revision number, e.g.static final StringUpdate number, e.g.static final StringJust a version, e.g. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet the application name for display purposes (includes branding)static StringGet the raw application name (suitable for file paths, etc.; includes branding)static StringGet the token for identifying stock vs branded OmegaT files.static StringReturns the OmegaT "pretty" version for display (includes the application name).static StringReturns the OmegaT full version for logs, etc.static StringReturns default text for progress bar when no project is loadedstatic ResourceBundleReturns resource bundle.static StringReturns the textual marker for the current segment.static StringReturns the OmegaT simple version for displaying to the user for comparison e.g.static StringgetSimpleVersion(String version, String update) static StringReturns a localized String for a keystatic StringReturns a localized string for a key, formatted with the given arguments.static StringReturns the OmegaT full version for logs, etc.static voidloadBundle(String filename) Loads resources from the specified file.static voidloadBundle(Locale locale) Loads resources with the specified locale.static voidvalidateVersion(Function<String, String> map) Check to make sure the given Properties contains valid information about an OmegaT version.
-
Field Details
-
BRANDING
For custom deployments of OmegaT that need to be distinguishable from "stock" OmegaT- See Also:
-
VERSION
Just a version, e.g. "1.6" -
UPDATE
Update number, e.g. 2, for 1.6.0_02 -
REVISION
Repository revision number, e.g. r7500 -
IS_BETA
public static final boolean IS_BETAIndicates whether this is a "beta" (or "latest") version or a "standard" version.
-
-
Method Details
-
getResourceBundle
Returns resource bundle. -
loadBundle
Loads resources with the specified locale.- Parameters:
locale- Locale to load.
-
loadBundle
Loads resources from the specified file. If the file cannot be loaded, resources are reverted to the default locale. Useful when testing localisations outside the jar file. -
getString
Returns a localized String for a key -
getString
Returns a localized string for a key, formatted with the given arguments. Formatting is done byStringUtil.format(String, Object...). -
getApplicationDisplayName
Get the application name for display purposes (includes branding) -
getApplicationName
Get the raw application name (suitable for file paths, etc.; includes branding) -
getBrandingToken
Get the token for identifying stock vs branded OmegaT files. Intended to be used in filenames, etc. Is the empty string ifBRANDINGis empty. -
getDisplayNameAndVersion
Returns the OmegaT "pretty" version for display (includes the application name). Example: "OmegaT 3.5", "OmegaT 3.5.1_2" -
getNameAndVersion
Returns the OmegaT full version for logs, etc. (includes the application name). Example: "OmegaT-3.5_0_dev", "OmegaT-3.5.1_0_r7532" -
getVersion
Returns the OmegaT full version for logs, etc. (does not include the application name). Example: "3.5_0_dev", "3.5.1_0_r7532" -
getSimpleVersion
Returns the OmegaT simple version for displaying to the user for comparison e.g. in a version update message. Does not include the revision because the revision is not guaranteed to be consistent across binaries in a single release. Example: "3.5.0", "3.5.1_1" -
getSimpleVersion
-
getProgressBarDefaultPrecentageText
Returns default text for progress bar when no project is loaded -
getSegmentMarker
Returns the textual marker for the current segment. NOTE: segment marker is assumed to contain "0000" string to overwrite with entry number. If zeros not detected, entry number will not be displayed -
validateVersion
Check to make sure the given Properties contains valid information about an OmegaT version. See Version.properties for more info.- Parameters:
map- A function that accepts a key and returns a value- Throws:
IllegalArgumentException- If the version info is invalid
-