Transposição - Quebrando as barreiras linguísticas

O transposh.org wordpress plugin vitrine e site de apoio

  • Início
  • Contacto
  • Baixar
  • FAQ
    • Doar
  • Tutorial
    • Showcase Widget
  • Sobre

Versão 1.0.9.5 – Lutando contra a podridão do código

Março 15, 2025 por Ofer 10 Comentários

Depois 16 anos de operação e mais de dois anos sem um novo lançamento, Nosso plug -in encontrou um desafio generalizado conhecido como Rot Code Rot. Esta questão surge quando a funcionalidade se degrada ao longo do tempo - mesmo sem alterações no código do plug -in - devido a fatores externos. Novos lançamentos do WordPress, Versões PHP atualizadas, e mudanças nos serviços de tradução podem interromper os recursos cuidadosamente projetados.

Na versão 1.0.9.5, Nós enfrentamos esses desafios, com um foco primário nos motores de tradução. Removemos o código desatualizado e introduzimos novas implementações para restaurar o suporte aos serviços de tradução de Yandex e Baidu, que parou de funcionar nos últimos anos. Essas atualizações garantem que os recursos de tradução estejam totalmente operacionais mais uma vez. Adicionalmente, Expandimos o suporte à linguagem para incluir novos idiomas adicionados a esses serviços de tradução ao longo do tempo.

Esta versão reflete nossa dedicação em manter o plug -in confiável e eficaz, adaptar -se ao cenário em evolução de tecnologias e serviços.

Introduzimos um novo widget que utiliza emojis de bandeira padrão, que foram incorporados ao conjunto emoji ao longo dos anos. Esta atualização simplifica significativamente o código do widget, ao mesmo tempo em que permite uma fácil personalização das bandeiras para atender às suas necessidades específicas.

Você pode conferir este novo widget em ação em nosso site, onde adicionamos um truque CSS inteligente que torna o ícone do idioma atual duas vezes maior que os outros, alcançado com apenas as duas linhas de código a seguir!
.transposh_flags{font-size:22px}
.tr_active{font-size:44px; float:left}

Esperamos que você goste desta nova versão!

Arquivado Em: Mensagens gerais, anúncios de lançamento, Actualizações de Software Tagged With: Emoji, lançamento, Widget, plugin wordpress

Comentários

  1. Matze Karajanov diz

    Março 16, 2025 no 3:52 sou

    How to translate your meta title and description with transposh!

    After some “vibe coding” as they say (people who don’t know how to code but still code with AI) I figured out in a creative way how to translate the meta title and description when using transposh.

    As an SEO marketing guy that was something that really bothered me. Translated sites, with English results in google.

    So how did I do it.

    First I added this php snippet (created by Grok 3)
    That translated the meta title for me.

    I called it Meta Title and Description in WP Snippet:

    add_filter('rank_math/frontend/title', function($title) {
    global $my_transposh_plugin;

    // Controleer of Transposh actief is
    if (!isset($my_transposh_plugin) || !is_object($my_transposh_plugin)) {
    return $title;
    }

    // Haal de huidige taal op
    $lang = transposh_get_current_language();

    // Vertaal alleen als de taal niet de standaardtaal is
    if ($lang && !$my_transposh_plugin->options->is_default_language($lang)) {
    // Gebruik fetch_translation om de title te vertalen
    list(, $translated_title) = $my_transposh_plugin->database->fetch_translation($title, $lang);
    if ($translated_title) {
    $title = $translated_title;
    }
    }

    return $title;
    });

    add_filter('rank_math/frontend/description', function($description) {
    global $my_transposh_plugin;

    // Controleer of Transposh actief is
    if (!isset($my_transposh_plugin) || !is_object($my_transposh_plugin)) {
    return $description;
    }

    // Haal de huidige taal op
    $lang = transposh_get_current_language();

    // Vertaal alleen als de taal niet de standaardtaal is
    if ($lang && !$my_transposh_plugin->options->is_default_language($lang)) {
    // Gebruik fetch_translation om de description te vertalen
    list(, $translated_description) = $my_transposh_plugin->database->fetch_translation($description, $lang);
    if ($translated_description) {
    $description = $translated_description;
    }
    }

    return $description;
    });

    – After this snippet > The Title was translated, but not the description. After further vibing and reaching a dead-end with Grok i figured that basically the transposh plugin was fetching the translation from the database multiple times.

    So i told Grok, hey if we add the meta title and description in the footer (hidden) as text.
    And Transposh translates it, if we than pull the description from the database that transposh manages for us wouldn’t it be translated?

    And Grok3 confirmed and gave me this snippet (after giving me a compliment for thinking outside the box)

    // Voeg de meta title en description toe aan de footer, alleen als de description is ingevuld
    add_action('wp_footer', function() {
    global $post;
    if (is_singular() && $post) {
    $meta_title = get_post_meta($post->ID, 'rank_math_title', true);
    $meta_description = get_post_meta($post->ID, 'rank_math_description', true);

    // Controleer of de meta description is ingevuld
    if (!empty($meta_description)) {
    // Standaard meta title als deze leeg is
    if (empty($meta_title)) {
    $meta_title = get_the_title($post->ID);
    }
    ?>

    document.addEventListener('DOMContentLoaded', function() {
    var metaElement = document.getElementById('transposh-meta');
    if (metaElement) {
    var translatedText = metaElement.innerText || metaElement.textContent;
    // Splits de tekst weer op in title en description (na vertaling)
    var parts = translatedText.split(' | ');
    var translatedDesc = parts[1] || translatedText; // Gebruik description na de |, anders hele tekst

    var metaTag = document.querySelector('meta[name="description"]');
    if (metaTag) {
    metaTag.setAttribute('content', translatedDesc);
    } else {
    var newMeta = document.createElement('meta');
    newMeta.name = 'description';
    newMeta.content = translatedDesc;
    document.head.appendChild(newMeta);
    }
    }
    });

    <?php
    }
    }
    });

    Just note, that I was using Rankmath as my SEO plugin, This maybe will work with Yoast? Or Other plugins, but I am sure if you feed this entire comment to an AI tool of your choice it could fix the correct fields for Yoast and others.

    Happy Translating guys and thank you for picking up the support of this plugin after so many years 🙂
    One of my top 3 secret weapons for sure!

    Resposta
  2. Matze Karajanov diz

    Março 16, 2025 no 3:57 sou

    Sorry I forgot to mention something.

    // Voeg de meta title en description toe aan de footer, alleen als de description is ingevuld

    If you’d translate this to english it says Add the meta title and description to the footer only if the description is filled in.

    The reason why only if it’s filled in is the same reason why I figured this footer trick would work.

    If I had a unique meta description for my pages, that was not on the website. It was not translated.

    But when I didn’t add a translation at all, and kept it empty, it will pull the top words of the page. So when I only added the first snippet above, it was only translating the title, because the title is also written on the page. but the meta description was unique and nowhere seen on the website.

    That’s basically how I figured out if we add an invisible meta description in the footer > we can translate meta titles and descriptions with that first snippet above.

    So you need both snippets for it to work.
    Or only the first if you never fill in your descriptions anyways. don’t bother.

    Resposta
  3. Prumo diz

    Março 18, 2025 no 3:51 sou

    When I save post, It shows this error:
    Aviso: Undefined array key “b” in \wp-content\plugins\transposh-translation-filter-for-wordpress\core\constants.php on line 1702

    I solved it by changing this code on line 1702

    E se ($langrec[‘engines’][$motor]) {

    para

    E se (ido($langrec[‘engines’][$motor])) {

    Resposta
    • Ofer diz

      Março 18, 2025 no 11:11 sou

      Obrigado por reportar este, fixados em https://github.com/oferwald/transposh/commit/70f1a6bafc72a0358b42ada8a576a9f02b5ed136

      Resposta
  4. Lulu Cheng diz

    Março 28, 2025 no 4:17 sou

    Olá, I use Ranmath for my website, Butthe title and description will not be translated,But the version a few years ago was OK,Can this plugin be optimized? Obrigado

    Resposta
    • Ofer diz

      Março 30, 2025 no 2:05 pm

      Had I known what Ranmath is, than maybe. I can only assume they changed something. And I can’t test things I know nothing of.

      Resposta
      • Lulu Cheng diz

        Março 30, 2025 no 5:41 pm

        Desculpe, I entered a wrong information, it is Rank math.

        Resposta
  5. Wu diz

    abril 5, 2025 no 10:11 sou

    I installed the latest version, but the language bar is blank. Please take the time to update the error. Obrigado.

    Resposta
  6. Stacy diz

    abril 8, 2025 no 2:52 pm

    Hello and sorry to come with a report but
    in admin in meta-box (define the language of the text) doesn’t work as he should. It show number rather than country.
    revert back to 1.0.9.4 working

    Resposta
  7. fhzy diz

    abril 24, 2025 no 4:52 sou

    why our plugin translates “Explosion Proof” as “爆炸性证明” or “爆炸式证明” instead of “防爆”.

    Resposta

Deixe uma resposta para Prumo Cancelar resposta

Seu endereço de email não será publicado. Campos obrigatórios são marcados *

Tradução

🇺🇸🇸🇦🇧🇩🏴󠁥󠁳󠁣󠁴󠁿🇨🇳🇹🇼🇭🇷🇨🇿🇩🇰🇳🇱🇪🇪🇵🇭🇫🇮🇫🇷🇩🇪🇬🇷🇮🇳🇮🇱🇮🇳🇭🇺🇮🇩🇮🇹🇯🇵🇮🇳🇰🇷🇱🇻🇱🇹🇲🇾🇮🇳🇮🇳🇳🇴🇵🇱🇵🇹🇵🇰🇷🇴🇷🇺🇷🇸🇸🇰🇸🇮🇪🇸🇸🇪🇮🇳🇮🇳🇹🇭🇹🇷🇺🇦🇵🇰🇻🇳
Definir como idioma predefinido
 Editar tradução

Patrocinadores

Gostaríamos de agradecer aos nossos patrocinadores!

Colecionadores de selos, moedas, notas, TCGs, jogos de vídeo e muito mais gosta de Transposh-traduzido Colnect no 62 idiomas. Troca, troca, gerenciar sua coleção pessoal usando nosso catálogo. O que você coleciona?
Coletores de conexão: moedas, selos e mais!

Comentários Recentes

  1. fhzy em Versão 1.0.9.5 – Lutando contra a podridão do códigoabril 24, 2025
  2. Stacy em Versão 1.0.9.5 – Lutando contra a podridão do códigoabril 8, 2025
  3. Wu em Versão 1.0.9.5 – Lutando contra a podridão do códigoabril 5, 2025
  4. Lulu Cheng em Versão 1.0.9.5 – Lutando contra a podridão do códigoMarço 30, 2025
  5. Ofer em Versão 1.0.9.5 – Lutando contra a podridão do códigoMarço 30, 2025

Etiquetas

0.7 0.9 Ajax bing (msn) tradutor aniversário buddypress bugfix centro de controle sprites CSS depurar tradução doados doações Emoji entrevistas fajutas bandeiras sprites bandeira versão completa gettext google-xml-sitemaps Traduz Google principal menor mais línguas analisador tradução profissional lançamento rss SecurityFix ESTE Código curto códigos de acesso melhorias de velocidade iniciar ThemeRoller trac ui vídeo Widget wordpress.org wordpress 2.8 wordpress 3.0 WordPress MU plugin wordpress wp-super-cache xcache

Feed de desenvolvimento

  • Liberação 1.0.9.6
    abril 5, 2025
  • Melhorias pequenas de código para editar interface e remover alguma depreciação…
    Março 22, 2025
  • Corrigir a chave de matriz indefinida
    Março 18, 2025
  • Finalmente, apoie o jQueryui 1.14.1, Encurre bem o código
    Março 17, 2025
  • Liberação 1.0.9.5
    Março 15, 2025

Social

  • Facebook
  • Chilro

Design by LPK Estúdio

Entradas (RSS) e Comentários (RSS)

direito autoral © 2025 · Transposh LPK Studio em Estrutura de Gênesis · WordPress · Conecte-se