类 OTAFileInstance

java.lang.Object
com.ghostchu.crowdin.OTAFileInstance

public class OTAFileInstance extends Object
  • 构造器详细资料

    • 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_mapping
      customLocaleCode - 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

      @NotNull public @NotNull Collection<String> 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 files
      threads - The maximum threads for fork-join-pool.