This repository has been archived by the owner on Mar 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduction of projects and preparation for first major release.
- Loading branch information
Jacob van Mourik
committed
Jan 28, 2017
1 parent
60171ad
commit 76e10a9
Showing
29 changed files
with
1,231 additions
and
535 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.jvms.i18neditor; | ||
|
||
/** | ||
* An enum describing the type of a {@link Resource}. | ||
* | ||
* <p>A resource type additionally holds information about the filename representation.</p> | ||
*/ | ||
public enum ResourceType { | ||
JSON(".json", false), | ||
ES6(".js", false), | ||
Properties(".properties", true); | ||
|
||
private final String extension; | ||
private final boolean embedLocale; | ||
|
||
/** | ||
* Gets the file extension of the resource type. | ||
* | ||
* @return the file extension. | ||
*/ | ||
public String getExtension() { | ||
return extension; | ||
} | ||
|
||
/** | ||
* Whether the locale should be embedded in the filename for this resource type. | ||
* | ||
* @return whether the locale should be embedded in the filename. | ||
*/ | ||
public boolean isEmbedLocale() { | ||
return embedLocale; | ||
} | ||
|
||
private ResourceType(String extension, boolean embedLocale) { | ||
this.extension = extension; | ||
this.embedLocale = embedLocale; | ||
} | ||
} |
Oops, something went wrong.