I18n is not connecting same entry of different locales

System Information
  • Strapi Version: 4.20.0
  • Operating System: windows
  • Database:Postgresql
  • Node Version: “>=18.0.0 <=20.x.x”
  • NPM Version: >=6.0.0
  • Yarn Version:

I have strapi v4, I have added the @strapi/plugin-i18n and created an articles collection which should be localized, changing locale lang on the admin dashboard clears the fields and even tho POST request includes the entryid of the old (existing one from different locale) id, the localizations array in the response comes up empty

my doubts of the cause

  1. the transformer plugin
module.exports = ({ env }) => ({
  'transformer': {
    enabled: true,
    config: {
      responseTransforms: {
        removeAttributesKey: true,
        removeDataKey: true,
      },
    }
  },
});
  1. the manual edits of our api controller
import { factories } from "@strapi/strapi";
export default factories.createCoreController(
  'api::article.article',
  ({ strapi }) => ({
    async find (ctx) {
      const { data, meta } = await super.find(ctx);
      const query = strapi.db.query('api::article.article');
      await Promise.all(
        data.map(async (item, index) => {
          const foundItem = await query.findOne({
            where: {
              id: item.id,
            },
            populate: ['createdBy', 'updatedBy', 'localizations'],
          });
          data[index].attributes.createdBy = {
            id: foundItem.createdBy.id,
            firstname: foundItem.createdBy.firstname,
            lastname: foundItem.createdBy.lastname,
          };
          data[index].attributes.updatedBy = {
            id: foundItem.updatedBy.id,
            firstname: foundItem.updatedBy.firstname,
            lastname: foundItem.updatedBy.lastname,
          };
          data[index].attributes.localizations = foundItem.localizations;
        })
      );
      return { data, meta };
    },
    async findOne (ctx) {
      const { data } = await super.findOne(ctx);
      const query = strapi.db.query('api::article.article');

      const foundItem = await query.findOne({
        where: {
          id: data.id,
        },
        populate: ['createdBy', 'updatedBy', 'localizations'],
      });

      if (!foundItem) return { data };

      data.attributes.createdBy = {
        id: foundItem.createdBy.id,
        firstname: foundItem.createdBy.firstname,
        lastname: foundItem.createdBy.lastname,
      };

      data.attributes.updatedBy = {
        id: foundItem.updatedBy.id,
        firstname: foundItem.updatedBy.firstname,
        lastname: foundItem.updatedBy.lastname,
      };
      data.attributes.localizations = foundItem.localizations;

      return { data };

    }
  })
);

attached with everyone of them is a code snippet of my code
please I need help with this asap and thanks in advance