[SOLVED] Finding missing strings and translations
Posted: Sun Mar 02, 2025 6:13 am
From my previous post where I was searching for localisation of a particular string I was wondering if there was any tools in OC to help find missing strings in the text files. I come with making myself a simple one line command tool that despite it's simplicity is already quite helpful.
One could replace
As a test in the topic file I found these :
Most of these strings are missing in my version of Opencart (4.1.0.0) topic file...
.
Code: Select all
find -type f -exec grep -l "\$this->load->language('extension/opencart/module/topic');" {} \; | while read file; do echo "Searching in file: $file"; grep -n "\$this->language->get" "$file"; done
by any translation files of OCextension/opencart/module/topic
As a test in the topic file I found these :
Code: Select all
Searching in file: /var/www/oc/extension/opencart/catalog/controller/module/topic.php
46: 'name' => $this->language->get('text_all') . ($this->config->get('config_article_count') ? ' (' . $this->model_cms_article->getTotalArticles() . ')' : ''),
Searching in file: /var/www/oc/extension/opencart/admin/controller/module/topic.php
17: $this->document->setTitle($this->language->get('heading_title'));
22: 'text' => $this->language->get('text_home'),
27: 'text' => $this->language->get('text_extension'),
32: 'text' => $this->language->get('heading_title'),
59: $json['error']['warning'] = $this->language->get('error_permission');
67: $json['success'] = $this->language->get('text_success');
.