类 OTAFileInstance
java.lang.Object
com.ghostchu.crowdin.OTAFileInstance
-
构造器概要
构造器构造器说明OTAFileInstance(@NotNull CrowdinOTA parent, @NotNull String fileName, int fileIndex, @NotNull kong.unirest.UnirestInstance unirest) Creates a OTAFileInstance instance. -
方法概要
修饰符和类型方法说明voiddownloadFiles(boolean includeExpired, int threads) Download translation files from Crowdin with Multi-Threaded (I/O Blocking)@NotNull Collection<String>Gets all available locales in this file.@Nullable StringgetLocaleContentByCrowdinCode(@NotNull String crowdinSyntaxLanguageCode) Get the translation content@Nullable StringgetLocaleContentByCustomCode(@NotNull String customSyntax, @NotNull String customLocaleCode) Get the translation content
-
构造器详细资料
-
OTAFileInstance
public OTAFileInstance(@NotNull @NotNull CrowdinOTA parent, @NotNull @NotNull String fileName, int fileIndex, @NotNull @NotNull kong.unirest.UnirestInstance unirest) throws OTAException Creates a OTAFileInstance instance.- 参数:
parent- The parent CrowdinOTA instance.fileName- The file name.fileIndex- The file position in `files` array.- 抛出:
OTAException- Throws a OTAException while failed during requesting or processing.
-
-
方法详细资料
-
getLocaleContentByCustomCode
@Nullable public @Nullable String getLocaleContentByCustomCode(@NotNull @NotNull String customSyntax, @NotNull @NotNull String customLocaleCode) Get the translation content- 参数:
customSyntax- The syntax name in language_mappingcustomLocaleCode- The language code in your custom syntax in language_mapping- 返回:
- The translation content.
-
getLocaleContentByCrowdinCode
@Nullable public @Nullable String getLocaleContentByCrowdinCode(@NotNull @NotNull String crowdinSyntaxLanguageCode) Get the translation content- 参数:
crowdinSyntaxLanguageCode- The crowdin syntax language code.- 返回:
- The translation content.
-
getAvailableLocales
Gets all available locales in this file.- 返回:
- A collection includes the crowdin locale codes
-
downloadFiles
public void downloadFiles(boolean includeExpired, int threads) Download translation files from Crowdin with Multi-Threaded (I/O Blocking)- 参数:
includeExpired- Whether to include files which expired, False will only download invalid/not cached filesthreads- The maximum threads for fork-join-pool.
-