docs: private static List<CmsMessages> collectModuleMessages(Locale locale) {
  
          // create a new list and add the base bundle
          ArrayList<CmsMessages> result = new ArrayList<CmsMessages>();
  
          //////////// iterate over all registered modules ////////////////
          Set<String> names = new HashSet<String>();
          Set<String> modules = OpenCms.getModuleManager().getModuleNames();
          if (modules != null) {
              names.addAll(modules);
          }
          // use service loader to get additional bundle names
          Iterator<I_CmsWorkplaceMessageBundleProvider> providers = ServiceLoader.load(
              I_CmsWorkplaceMessageBundleProvider.class).iterator();
          while (providers.hasNext()) {
              try {
                  I_CmsWorkplaceMessageBundleProvider provider = providers.next();
                  names.addAll(provider.getMessageBundleNames());
              } catch (Throwable t) {
                  LOG.error("Error loading workplace messages bundle names from classpath.", t);
              }
          }
  
          // iterate all module names
          for (String baseName : names) {
              //////////// collect the workplace.properties ////////////////
              // this should result in a name like "my.module.name.workplace"
              String bundleName = baseName + PREFIX_BUNDLE_WORKPLACE;
              // try to load a bundle with the module names
              CmsMessages msg = new CmsMessages(bundleName, locale);
              // bundle was loaded, add to list of bundles
              if (msg.isInitialized()) {
                  result.add(msg);
              }
              //////////// collect the messages.properties ////////////////
              // this should result in a name like "my.module.name.messages"
              bundleName = baseName + PREFIX_BUNDLE_MESSAGES;
              // try to load a bundle with the module names
              msg = new CmsMessages(bundleName, locale);
              // bundle was loaded, add to list of bundles
              if (msg.isInitialized()) {
                  result.add(msg);
              }
          }
  
          //////////// collect additional core packages ////////////////
          I_CmsMessageBundle[] coreMsgs = A_CmsMessageBundle.getOpenCmsMessageBundles();
          for (int i = 0; i < coreMsgs.length; i++) {
              I_CmsMessageBundle bundle = coreMsgs[i];
              result.add(bundle.getBundle(locale));
          }
  
          /////////// collect bundles configured in module configurations ////////
          if (OpenCms.getADEManager().isInitialized()) {
              Set<String> bundleNames = OpenCms.getADEManager().getConfiguredWorkplaceBundles();
              for (String bundleName : bundleNames) {
                  CmsMessages msg = new CmsMessages(bundleName, locale);
                  if (msg.isInitialized()) {
                      result.add(msg);
                  }
              }
          }
          return result;
      }