Returns the list of available locale suffixes for a message resource
bundle

@param messageBundlePath
the resource bundle path
@param fileSuffix
the file suffix
@return the list of available locale suffixes for a message resource
bundle
777030
public static List<String> getAvailableLocaleSuffixesForBundle(String messageBundlePath, String fileSuffix) {
		return getAvailableLocaleSuffixesForBundle(messageBundlePath, fileSuffix, null);
	}
1194413
private String messageImportUpdate(Locale locale) {

        return Messages.get().getBundle(locale).key(Messages.ERR_ALIAS_IMPORT_UPDATED_0);
    }
1373692
private String messageImportOk(Locale locale) {

        return Messages.get().getBundle(locale).key(Messages.ERR_ALIAS_IMPORT_OK_0);
    }
416173
public static function langParser($filePath, $relativePath = '')
	{
		$lang = [];
		$parsed = self::arrayParser($relativePath . $filePath);

		foreach ($parsed as $parse)
		{
			$lang = array_merge($lang, $parse);
		}

		return $lang;
	}
1332255
public static String getManifestXml(String apkFilePath, Locale locale) throws IOException {
        try (ApkFile apkFile = new ApkFile(apkFilePath)) {
            apkFile.setPreferredLocale(locale);
            return apkFile.getManifestXml();
        }
    }
37109
private MessageResources lookupStrutsBundle(String name) {
        Object value = _servletContext.getAttribute(name);
        if(value instanceof MessageResources)
            return (MessageResources)value;
        else {
            if(value != null)
                LOGGER.warn("Can not resolve module bundle with name \"" +
                    name
                    + "\".  The object resolved from ServletContext is of type "
                    + value.getClass().toString());
            return null;
        }
    }
27059
public static ApkMeta getMetaInfo(String apkFilePath, Locale locale) throws IOException {
        try (ApkFile apkFile = new ApkFile(apkFilePath)) {
            apkFile.setPreferredLocale(locale);
            return apkFile.getApkMeta();
        }
    }
1082372
public static final String posixString(Path path)
    {
        String prefix = path.isAbsolute() ? "/" : "";
        String suffix = Files.isDirectory(path) ? "/" : "";
        return StreamSupport.stream(path.spliterator(), false)
                .map((p)->p.toString())
                .collect(Collectors.joining("/", prefix, suffix));
    }
99213
public static Predicate suffixes(final String... paths) {
        if(paths.length == 1) {
            return suffix(paths[0]);
        }
        final PathSuffixPredicate[] predicates = new PathSuffixPredicate[paths.length];
        for (int i = 0; i < paths.length; ++i) {
            predicates[i] = new PathSuffixPredicate(paths[i]);
        }
        return or(predicates);
    }
1028635
public static String getMessage(String key, String bundle) {
        if (!messagesBundles.containsKey(bundle)) {
            if (Context.getLocale() == null) {
                messagesBundles.put(bundle, ResourceBundle.getBundle("i18n/" + bundle, Locale.getDefault()));
            } else {
                messagesBundles.put(bundle, ResourceBundle.getBundle("i18n/" + bundle, Context.getLocale()));
            }

        }
        return messagesBundles.get(bundle).getString(key);
    }
926219
private CmsResource getMessageBundle() {

        OpenCms.getLocaleManager();
        String localString = CmsLocaleManager.getDefaultLocale().toString();
        List<String> moduleResource = m_module.getResources();
        for (String resourcePath : moduleResource) {
            if (resourcePath.contains(PATH_I18N) && resourcePath.endsWith(localString)) {
                try {
                    return m_cms.readResource(resourcePath);
                } catch (CmsException e) {
                    LOG.error("Can not read message bundle", e);
                }
            }
        }
        String moduleFolder = getModuleFolder(m_module.getName());
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(moduleFolder)) {
            return null;
        }
        String bundlePath = CmsStringUtil.joinPaths(
            moduleFolder,
            PATH_I18N,
            m_module.getName() + SUFFIX_BUNDLE_FILE + "_" + localString);
        if (m_cms.existsResource(bundlePath)) {
            try {
                return m_cms.readResource(bundlePath);
            } catch (CmsException e) {
                LOG.error("No bundle found for module", e);
            }
        }
        return null;
    }
282593
public static ResourceBundle getResourceBundle(String bundleName, Locale locale) {
        ResourceBundle bundle = null;

        boolean isDev = false;
        if (Ameba.getApp() != null) {
            isDev = Ameba.getApp().getMode().isDev();
            BUNDLE_CONTROL.noCache = isDev;
        }
        if (!isDev) {
            bundle = RESOURCE_BUNDLES.get(bundleName, locale);
        }
        if (bundle == null) {
            try {
                bundle = ResourceBundle.getBundle(
                        bundleName,
                        locale,
                        ClassUtils.getContextClassLoader(),
                        BUNDLE_CONTROL
                );
            } catch (MissingResourceException e) {
                // no op
            }
        }

        if (bundle != null && !isDev) {
            RESOURCE_BUNDLES.put(bundleName, locale, bundle);
        }

        return bundle;
    }
176723
@Override
	public ResourceBundlePathsIterator getBundlePaths(DebugMode debugMode, String bundleId,
			ConditionalCommentCallbackHandler commentCallbackHandler, Map<String, String> variants) {

		List<JoinableResourceBundle> currentBundles = new ArrayList<>();

		// if the path did not correspond to a global bundle, find the requested
		// one.
		if (!isGlobalResourceBundle(bundleId)) {
			for (JoinableResourceBundle bundle : contextBundles) {
				if (bundle.getId().equals(bundleId)) {

					currentBundles.add(bundle);
					break;
				}
			}
		}

		return getBundleIterator(debugMode, currentBundles, commentCallbackHandler, variants);
	}
559769
public static Resource getFileResource(String filePath, TestContext context) {
        if (filePath.contains(FILE_PATH_CHARSET_PARAMETER)) {
            return new PathMatchingResourcePatternResolver().getResource(
                    context.replaceDynamicContentInString(filePath.substring(0, filePath.indexOf(FileUtils.FILE_PATH_CHARSET_PARAMETER))));
        } else {
            return new PathMatchingResourcePatternResolver().getResource(
                    context.replaceDynamicContentInString(filePath));
        }
    }
695555
function getImportPaths(filePath){
  var importPaths = [];
  try{
    var contents = fs.readFileSync(filePath).toString('utf8');
    importPaths = parseImpt(contents);
  }
  catch(exception){}
  return importPaths;
}
1335468
protected ResourceBundle resourceBundle(Locale locale) {
        return ResourceBundle.getBundle(
            contentPath.replace('/', '.') + ".l10n", locale,
            contentLoader, ResourceBundle.Control.getNoFallbackControl(
                ResourceBundle.Control.FORMAT_DEFAULT));
    }
475598
private static String getResource(Bundle myBundle, String resourcePath) {
        if (myBundle == null)
            return null;
        String bundleShortDescription = getBundleDescription(myBundle);
        StringBuilder responseString = new StringBuilder();
        URL bundleResource = myBundle.getResource(resourcePath);
        if (bundleResource != null) {
            BufferedReader br = null;
            try { // read the requested resource from the bundle
                br = new BufferedReader(new InputStreamReader(bundleResource.openConnection().getInputStream(), "UTF-8"));
                while (br.ready()) {
                    responseString.append(br.readLine());
                }
                br.close();
            } catch (Exception e) { // shouldn't happen
                if (OpenAPIUtils.isEventEnabled(tc)) {
                    Tr.event(tc, "Exception trying to read resource at " + resourcePath + " from bundle " + bundleShortDescription);
                }
            }

        } else {
            if (OpenAPIUtils.isEventEnabled(tc)) {
                Tr.event(tc, "Unexpected error getting resource from WAB bundle.");
            }
        }
        return responseString.toString();
    }