code: @Transactional
    public void addMissingMessageIds(String namespace, Set<String> messageIDs) {
      Set<String> alreadyPresent =
          getExistingMessages(namespace, messageIDs)
              .map(L10nString::getMessageID)
              .collect(toCollection(TreeSet::new));
      Set<String> toAdd = Sets.difference(messageIDs, alreadyPresent);
      if (!toAdd.isEmpty()) {
        Stream<L10nString> entities =
            toAdd
                .stream()
                .map(key -> l10nStringFactory.create(key).setMessageID(key))
                .map(l -> l.setNamespace(namespace));
        dataService.add(L10N_STRING, entities);
        LOG.debug("Added message IDs to namespace '{}' : {}.", namespace, messageIDs);
      }
    }
docs: Adds Localization strings for missing messageIDs in a namespace. User needs write permission on
  the {@link L10nString} entity.
  
  @param namespace the namespace to which the missing messageIDs should be added
  @param messageIDs the missing messageIDs to add.