Jelajahi Sumber

wrong translation of countries in material's manufacturer & distributors #1953

bach 1 tahun lalu
induk
melakukan
024cf0e08f

+ 3 - 1
web/modules/custom/materio_graphql/src/Plugin/GraphQL/SchemaExtension/MaterioSchemaExtension.php

@@ -1293,8 +1293,10 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
 
     $registry->addFieldResolver('Country', 'country_name',
      $builder->callback(function ($parent, $args) {
+        // As company terms are not translated we have to get the current site language instead of parent language
+        $langcode = \Drupal::languageManager()->getCurrentLanguage()->getId();
         $cc =  $parent[0]['country_code'];
-        $countries = $this->countryRepository->getList();
+        $countries = $this->countryRepository->getList($langcode);
         $cn = isset($countries[$cc]) ? $countries[$cc] : $cc;
         return $cn;
      })

File diff ditekan karena terlalu besar
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/main.js


TEMPAT SAMPAH
web/themes/custom/materiotheme/assets/dist/main.js.gz


+ 1 - 1
web/themes/custom/materiotheme/vuejs/api/graphql-axios.js

@@ -6,7 +6,7 @@ import axios from 'axios'
 console.log(window.location)
 
 const MGQ = axios.create({
-  baseURL: window.location.origin + '/mgq',
+  baseURL: window.location.origin + '/' + drupalSettings.path.pathPrefix + 'mgq',
   withCredentials: true,
   headers: {
     Accept: 'application/json',

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini