Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2018-03-11 21:42:40

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,220
Website

Re: Fatal error when I upgrade a 4.7 dev site with plugins

Bloke wrote #309804:

Language strings are now only loaded if their event matches the current panel’s event name.

As I’ve said before, at the moment they seem to be loaded regardless, but you mention adi_matrix as an example and this is where things start to get complicated. It uses events “adi_matrix_admin” for the admin panel and “adi_matrix_matrix_1, adi_matrix_matrix_2 …” for the matrix panels. As the latter ones are generated automatically, adi_matrix will have to use the “admin-side” event. You’ll see this with smd_tabber as well.

There are special events:

  • ‘#@public’ are loaded on the public site only.
  • ‘#@admin-side’ are loaded on all admin panels.
  • ‘#@common’ are loaded on the public site and the all admin panels, i.e. everywhere.

Given those limitations, you might think it safe to stick them all in ‘common’ and be done with it. Well, yes, you could. But the whole point of doing this is to try and limit the amount of memory usage on each page. In 4.6, every page loaded 1100+ strings from the database. In 4.7, it’s a fraction of that. So in the interests of performance, we’ll be encouraging plugin authors to stick the strings in the appropriate groups.

I’ve got 200+ adi_language_strings. Many specific to certain plugins, some used by all, some used by more than one, some “public”, many “admin-side” … you get the picture. All non-English strings are available to adi_plugin_users in a separate downloadable Textpack file for ease of management and to save having to reissue a plugin everything a new language set comes in.

The permutations are mind-bending. What was simple (for me) is now complicated.

… Whether any of that works or means that deleting one of your plugins removes the strings from all of them, I can’t recall. … before we enforce the lang strings to load on their designated panels only.

In the situation where a string used by several plugins, will this mean that deleting one plugin will affect another?

Owner “gomedia”, event “common” is looking very attractive at the moment.

Offline

#32 2018-03-12 13:11:19

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 6,911
Website

Re: Fatal error when I upgrade a 4.7 dev site with plugins

gomedia wrote #309911:

As I’ve said before, at the moment they seem to be loaded regardless, but you mention adi_matrix as an example and this is where things start to get complicated.

Indeed. I am checking it now. Number of articles loaded does not work. Also, strangely enough the numbers at the bottom of the page read: 12, 24, 48, 96 instead of 15, 25, 50, 100 in the stable txp release but I’ll check this again as the dev site does not have all the articles present in the live one.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#33 2018-03-12 14:25:57

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

Re: Fatal error when I upgrade a 4.7 dev site with plugins

gomedia wrote #309911:

events “adi_matrix_admin” for the admin panel and “adi_matrix_matrix_1, adi_matrix_matrix_2 …” for the matrix panels. As the latter ones are generated automatically, adi_matrix will have to use the “admin-side” event. You’ll see this with smd_tabber as well.

Yes, that’s a bind. But if you want the tab name to appear in “all menus” as you navigate any panel on the admin side, there’s no neat alternative than to put them in a group that is loaded on all panels. Or go back to how we had it, and load all strings everywhere, which is a memory and performance hog.

I’m exploring alternatives though. For example, making sure that shortcuts exist so that the owner, event and language headers are retained when you switch between them as packs are installed. That way you don’t need to keep specifying the full set each time. I think it does that already but I need to check that and make it happen if not.

Also, how about permitting a “group” as part of the owner string? go_media.adi_matrix, go_media.adi_form_links, … you could then assign strings to go_media. (note: trailing dot) to have plugin-less strings installed, that are still “owned” by you. Bit of a hack, but it does mean that we can split on dot, treat owners as now when deleting plugins but leave any strings alone that don’t match the owner. Then, perform an additional check on plugin deletion to see if there are any strings left with your owner. If there are, leave everything. If not, well, the last plugin by that owner has just been deleted so any “shared” (plugin-less) strings can also be removed.

Not sure if that solves anything. Plugins wouldn’t have to use it. And you’d still have to bundle all strings – shared or not – with each plugin, and/or provide a separate machanism as you do now to install them from a third party server.

Just note that “install” now doesn’t necessarily mean “put in txp_lang table” – it means “put in textpack column of plugin table”. Because then they are available to automatically install when new languages are added/deleted.

Note also that installing from a third party server won’t work as expected for plugins running from file (cache). The strings can’t be “installed” anywhere in the database, since there’s no “plugin textpack” column to house all current translations. You could inject them direcly into the txp_lang table and it’ll work, you just have no core way (currently) of cleaning up unless you do it by hand in all of your plugins somehow.

I’ve got 200+ adi_language_strings. Many specific to certain plugins, some used by all, some used by more than one, some “public”, many “admin-side” … you get the picture. All non-English strings are available to adi_plugin_users in a separate downloadable Textpack file for ease of management and to save having to reissue a plugin everything a new language set comes in.

Having all plugin strings in one humungous pack is something that we support. We just need to find a decent way to segregate them in your pack. See above. You could distribute the “latest” adi mega pack in each released plugin so that installing from cache worked on-the-fly. Bit of a wate of space, but there’s probably enough overhead in the table to do it… maybe. Depends if you reach MySQL row limits.

If your plugins retain the ability to download the latest adi mega pack as part of its internal logic, note (as I mentioned above) the best way to do so is to insert them in the plugin’s textpack column if you can. That way, if someone deletes or installs a new language and it’s one your pack supports, it gets loaded for free by core.

That still leaves cache plugins a little out in the cold. If you offer them a “download latest mega pack” feature, how do you currently install them? Just inject them directly into txp_lang? If so, that’ll probably interfere with the current “load strings from cache on the fly” facility, as the ones read from the cached plugin may override the (newer) ones in the lang table. Not sure, haven’t tried that. We probably need to be a bit more clever here when things are merged.

Also, as you surmised, plugins that share an owner will be deleted when you delete a plugin. That’s by design so it’s easy to clean up when a plugin is removed and not leave floating strings around. Introducing some dotted sub-owner notation system as above would help here I think for plugins that form part of a suite or whose authors wish to manage all strings for all plugins as one pack.

colak wrote #309915:

the numbers at the bottom of the page read: 12, 24, 48, 96 instead of 15, 25, 50, 100

That’s by design. Those values are more grid friendly.

Last edited by Bloke (2018-03-12 14:30:10)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#34 2018-03-12 23:49:57

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,220
Website

Re: Fatal error when I upgrade a 4.7 dev site with plugins

Bloke wrote #309917:

Yes, that’s a bind. But if you want the tab name to appear in “all menus” as you navigate any panel on the admin side, there’s no neat alternative than to put them in a group that is loaded on all panels. Or go back to how we had it, and load all strings everywhere, which is a memory and performance hog.

But now that TXP itself is not a hog, then maybe us smaller plugin hogs don’t have to worry about it ;-)

I’m exploring alternatives though. For example, making sure that shortcuts exist so that the owner, event and language headers are retained when you switch between them as packs are installed. That way you don’t need to keep specifying the full set each time. I think it does that already but I need to check that and make it happen if not.

Also, how about permitting a “group” as part of the owner string? go_media.adi_matrix, go_media.adi_form_links, … you could then assign strings to go_media. (note: trailing dot) to have plugin-less strings installed, that are still “owned” by you. Bit of a hack, but it does mean that we can split on dot, treat owners as now when deleting plugins but leave any strings alone that don’t match the owner. Then, perform an additional check on plugin deletion to see if there are any strings left with your owner. If there are, leave everything. If not, well, the last plugin by that owner has just been deleted so any “shared” (plugin-less) strings can also be removed.

Is there an issue/complication with introducing a new entity “owner”? Bearing in mind that a suite of plugins, by the same author, probably only uses a plugin author-owned textpack – would it be better to make the owner the plugin prefix?

Not sure if that solves anything. Plugins wouldn’t have to use it. And you’d still have to bundle all strings – shared or not – with each plugin, and/or provide a separate machanism as you do now to install them from a third party server.

I, personally, would prefer to manage my plugin strings in one big chunk. Embedding my English within the plugin works great (both with installed & cached methods). Supplying non-English alternatives via a downloadable file has worked well for me too – especially as non-English translations appear in an adhoc fashion, suiting my system of updating an online text file. At least then I don’t have to reissue the plugin every time.

Just note that “install” now doesn’t necessarily mean “put in txp_lang table” – it means “put in textpack column of plugin table”. Because then they are available to automatically install when new languages are added/deleted.

Note also that installing from a third party server won’t work as expected for plugins running from file (cache). The strings can’t be “installed” anywhere in the database, since there’s no “plugin textpack” column to house all current translations. You could inject them direcly into the txp_lang table and it’ll work, you just have no core way (currently) of cleaning up unless you do it by hand in all of your plugins somehow.

I’m not fussed about non-embedded (i.e. non-English) strings not being available automatically with cached plugins. I don’t need them for the UI or for development and can always download the textpack file on a properly plugin-installed site anyway for checking. I think they get loaded in anyway – I’m sure I’ve done it, changed the dev site language & seen the translations. Housekeeping is not so much of an issue on a dev site.

Having all plugin strings in one humungous pack is something that we support. We just need to find a decent way to segregate them in your pack. See above. You could distribute the “latest” adi mega pack in each released plugin so that installing from cache worked on-the-fly. Bit of a wate of space, but there’s probably enough overhead in the table to do it… maybe. Depends if you reach MySQL row limits.

As I mentioned before I like a big chunk and to manage it separately from plugins. In my case it’s a downloadable textpack file, but there’s always the dedicated “lang” plugin method – as used in the old zen_contact_reborn plugin. With an online file, however, I can wilfully disregard version numbers etc etc.

If your plugins retain the ability to download the latest adi mega pack as part of its internal logic, note (as I mentioned above) the best way to do so is to insert them in the plugin’s textpack column if you can. That way, if someone deletes or installs a new language and it’s one your pack supports, it gets loaded for free by core. Regarding segregation – see below.

Yep, now that $textarray is no more, I’ll do 4.7 versions of my plugins using the $plugin['textpack'] thang.

That still leaves cache plugins a little out in the cold. If you offer them a “download latest mega pack” feature, how do you currently install them? Just inject them directly into txp_lang? If so, that’ll probably interfere with the current “load strings from cache on the fly” facility, as the ones read from the cached plugin may override the (newer) ones in the lang table. Not sure, haven’t tried that. We probably need to be a bit more clever here when things are merged.

See above – I’m content with English-only strings automatically available with cached plugins.

Also, as you surmised, plugins that share an owner will be deleted when you delete a plugin. That’s by design so it’s easy to clean up when a plugin is removed and not leave floating strings around. Introducing some dotted sub-owner notation system as above would help here I think for plugins that form part of a suite or whose authors wish to manage all strings for all plugins as one pack.

I like the “plugin bulk textpack owner” idea.

As a plugin author, it’s the organising & maintenance of language strings that I’m concerned at. Maybe the primary indexing for the strings in the textpack is the issue. At the moment it seems to be done by language. Perhaps it should be done by string – and then for each one a set of language translations, the plugin & the event?

Offline

#35 2018-03-13 08:51:21

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 3,159
Website

Re: Fatal error when I upgrade a 4.7 dev site with plugins

gomedia wrote #309926:

… suiting my system of updating an online text file. At least then I don’t have to reissue the plugin every time. … As I mentioned before I like a big chunk and to manage it separately from plugins … As a plugin author, it’s the organising & maintenance of language strings that I’m concerned at.

Not an answer to the specific question at hand, but could Jukka’s little suite of plugin management plugins help in easing the administrative aspect of handling the updating and serving of many plugins:

  • rah_blobin works like the plugin cache but allows you to keep docs, code and textpacks separate and supports the plugin lifecycle handling.
  • rah_plugcompile is a class that compiles the plugin txt files from this format and can handle many at once.

I’m sure he once wrote about the workflow he uses these to keep his site downloads up to date with his release repositories but I can’t find it now.


TXP Builders – finely-crafted code, design and txp

Offline

#36 2018-03-14 06:49:01

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,220
Website

Re: Fatal error when I upgrade a 4.7 dev site with plugins

jakob wrote #309927:

Not an answer to the specific question at hand, but could Jukka’s little suite of plugin management plugins help in easing the administrative aspect of handling the updating and serving of many plugins:

Not sure – but thanks anyway.

Offline

#37 2018-03-14 06:54:23

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,220
Website

Re: Fatal error when I upgrade a 4.7 dev site with plugins

Here’s another thought bubble.

Could it be the case that if the plugin has all the string/event mappings then the external mega-textpack wouldn’t need to be so detailed. When it’s loaded in, the non-English strings would be slotted into the table following the same scheme.

In other words the embedded textpack in the plugin (or even the block of English strings in a textpack file) would define the “schema”.

Offline

#38 2018-03-18 13:44:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

Re: Fatal error when I upgrade a 4.7 dev site with plugins

@adi:

I’ve been tinkering with your Textpack. As far as I can work out, the following structure works well. Whether it aligns with your way of working I’m not sure, but this pack can be pasted into the Languages panel to install all other languages for the adi_matrix plugin and some of the ‘shared’ things on the admin side that are common to all your plugins:

#@owner gomedia

###########################################
######## Shared admin-side strings ########
###########################################
#@admin-side

#@language en, en-gb, en-us, en-ca
tab_recent => Recent
adi_alphabetical => Alphabetical
adi_any_category => Any category
adi_any_child_category => Any child category
adi_blank_url_title => URL-only title blank
adi_cancel => Cancel
adi_cf_links => Custom field links
adi_default_sort => Default sort
adi_display_article_id => Display article ID#
adi_duplicate_url_title => URL-only title already used
adi_edit_titles => Edit titles
adi_footer => Footer
adi_has_expiry => Has expiry
adi_install_fail => Unable to install
adi_installed => Installed
adi_invalid_timestamp => Invalid timestamp
adi_jquery_ui => jQuery UI script file
adi_jquery_ui_css => jQuery UI CSS file
adi_logged_in_user => Logged in user
adi_new_article => New article
adi_no_category => No category
adi_no_expiry => No expiry
adi_not_installed => Not installed
adi_numerical => Numerical
adi_ok => OK
adi_one_category => One category
adi_any_parent_category => Any parent category
adi_pref_update_fail => Preference update failed
adi_reset => Reset
adi_scroll => Scroll
adi_show_section => Show section
adi_sort_type => Sort type
adi_tab => Tab
adi_textpack_fail => Textpack installation failed
adi_textpack_feedback => Textpack feedback
adi_textpack_online => Textpack also available online
adi_tiny_mce => TinyMCE
adi_tiny_mce_dir_path => TinyMCE directory path
adi_tiny_mce_hak => TinyMCE (hak_tinymce)
adi_tiny_mce_javascript => TinyMCE (Javascript)
adi_tiny_mce_jquery => TinyMCE (jQuery)
adi_tiny_mce_config => TinyMCE configuration
adi_two_categories => Two categories
adi_uninstall => Uninstall
adi_uninstall_fail => Unable to uninstall
adi_uninstalled => Uninstalled
adi_update_prefs => Update preferences
adi_upgrade_fail => Unable to upgrade
adi_upgrade_required => Upgrade required
adi_upgraded => Upgraded
adi_user => User

#@language cs
adi_install_fail => Nelze nainstalovat
adi_installed => Nainstalováno
adi_not_installed => Nenainstalováno
adi_textpack_fail => Instalace textového balíčku se nezdařila
adi_textpack_feedback => Textový balíček - zpětná odezva
adi_textpack_online => Textový balíček je rovněž dostupný online
adi_uninstall => Odinstalovat
adi_uninstall_fail => Nelze odinstalovat
adi_uninstalled => Odinstalováno
adi_upgrade_fail => Nelze aktualizovat
adi_upgrade_required => Vyžadována aktualizace
adi_upgraded => Aktualizováno

#@language de
tab_recent => Benutzte Objekte
adi_install_fail => Installation nicht möglich
adi_installed => Installiert
adi_not_installed => Nicht installiert
adi_textpack => Textpack
adi_textpack_fail => Textpack-Installation fehlgeschlagen
adi_textpack_feedback => Textpack-Feedback
adi_textpack_online => Textpack ist auch online verfügbar
adi_uninstall => Deinstallieren
adi_uninstall_fail => Deinstallation fehlgeschlagen
adi_uninstalled => Deinstalliert
adi_upgrade_fail => Upgrade nicht möglich
adi_upgrade_required => Upgrade benötigt
adi_upgraded => Upgrade erfolgreich

#@language es
adi_install_fail => Fallo en la instalación
adi_installed => Instalado correctamente
adi_not_installed => No instalado
adi_textpack_fail => Fallo al intentar instalar el paquete de idioma
adi_textpack_feedback => Textpack feedback
adi_textpack_online => Textpack también está disponible online
adi_uninstall => Desinstalar
adi_uninstall_fail => Imposible desinstalar
adi_uninstalled => Desinstalado
adi_upgrade_fail => Imposible actualizar
adi_upgrade_required => Actualización requerida
adi_upgraded => Actualizado

#@language fr
adi_install_fail => Impossible d'installer
adi_installed => Installé
adi_not_installed => Non installé
adi_textpack => Textpack
adi_textpack_fail => L'installation du "Textpack" a échoué
adi_textpack_feedback => Suggestions sur le "Textpack"
adi_textpack_online => "Textpack" est également disponible en ligne
adi_uninstall => Désinstaller
adi_uninstall_fail => Impossible de désinstaller
adi_uninstalled => Désinstallé
adi_upgrade_fail => Impossible de faire la mise à niveau
adi_upgrade_required => Mise à niveau nécessaire
adi_upgraded => Mise à niveau faite

#@language it
adi_install_fail => Impossibile installare
adi_installed => Installato
adi_not_installed => Non installato
adi_textpack_fail => Installazione del Textpack fallita
adi_textpack_feedback => Textpack feedback
adi_textpack_online => Textpack è disponibile anche online
adi_uninstall => Disinstalla
adi_uninstall_fail => Impossibile disinstallare
adi_uninstalled => Disinstallato
adi_upgrade_fail => Aggiornamento fallito
adi_upgrade_required => Aggiornamento richiesto
adi_upgraded => Aggiornato

#@language ja
adi_install_fail => インストールに失敗しました
adi_installed => インストールしました
adi_not_installed => インストールされていません
adi_textpack => 言語パック
adi_textpack_fail => 言語パックのインストールに失敗しました
adi_textpack_feedback => 言語パックのフィードバック
adi_textpack_online => 言語パックのオンラインダウンロード
adi_uninstall => アンインストール
adi_uninstall_fail => アンインストールに失敗しました
adi_uninstalled => アンインストールしました
adi_upgrade_fail => 更新に失敗しました
adi_upgrade_required => 更新が必要です
adi_upgraded => 更新しました

#@language pl
adi_install_fail => Nie można zainstalować
adi_installed => Zainstalowano
adi_not_installed => Nie zainstalowano
adi_textpack_fail => Instalacja Textpacka nie powiodła się
adi_textpack_feedback => Uwagi na temat Textpacka
adi_textpack_online => Textpack jest również dostępny online
adi_uninstall => Odinstaluj
adi_uninstall_fail => Nie udało się odinstalować
adi_uninstalled => Odinstalowano

#@language pt-br
adi_textpack_fail => A instalação do Textpack falhou
adi_textpack_feedback => Textpack feedback
adi_textpack_online => Textpack também disponível online

#@language ru
adi_install_fail => Не удается установить
adi_installed => Установлено
adi_not_installed => не установлено
adi_textpack_fail => Установка Textpack не завершилась
adi_textpack_feedback => Обратная связь о Textpack
adi_textpack_online => Textpack также доступен онлайн
adi_uninstall => Удалить
adi_uninstall_fail => Не удается удалить
adi_uninstalled => Удалено

#@language sv
adi_install_fail => Kan inte installera
adi_installed => Installerad
adi_not_installed => Inte installerad
adi_textpack_fail => Textpack-installation misslyckades
adi_textpack_feedback => Textpack-återkoppling
adi_textpack_online => Textpack finns även tillgängligt online
adi_uninstall => Avinstallera
adi_uninstall_fail => Kan inte installera
adi_uninstalled => Avinstallerad
adi_upgrade_fail => Går inte att uppgradera
adi_upgrade_required => Uppgradering krävs
adi_upgraded => Uppgraderad

############################
######## adi_matrix ########
############################
#@adi_matrix

#@language en, en-gb, en-us, en-ca
adi_article_data => Article Data
adi_article_matrix => Article Matrix
adi_article_highlighting => Article title highlighting
adi_article_limit => Maximum number of articles
adi_articles_not_modified => No articles modified
adi_article_selection => Article Selection
adi_article_tooltips => Article title tooltips
adi_article_update_fail => Article update failed
adi_articles_saved => Articles saved
adi_custom_condition => Custom condition
adi_include_descendent_cats => Include descendent categories
adi_expiry => Expiry
adi_matrix => Matrix
adi_matrix_admin => Article Matrix Admin
adi_matrix_total_articles => Total articles in matrix:
adi_matrix_cfs_modified => Custom field list modified
adi_matrix_delete_fail => Matrix delete failed
adi_matrix_deleted => Matrix deleted
adi_matrix_input_field_tooltips => Input field tooltips
adi_matrix_validation_error => Validation errors
adi_matrix_name => Matrix name
adi_matrix_update_fail => Matrix settings update failed
adi_matrix_updated => Matrix settings updated
adi_update_matrix => Update matrix settings

#@language de
adi_article_data => Artikeldaten
adi_article_highlighting => Artikeltitel hervorheben
adi_article_limit => Maximale Artikelanzahl
adi_article_selection => Artikelauswahl
adi_article_tooltips => Artikeltitel Tooltips
adi_article_update_fail => Artikelaktualisierung fehlgeschlagen
adi_articles_saved => Artikel gesichert
adi_matrix => Matrix
adi_matrix_delete_fail => Löschen der Matrix fehlgeschlagen
adi_matrix_deleted => Matrix gelöscht
adi_matrix_name => Name der Matrix
adi_matrix_update_fail => Aktualisierung der Matrix-Einstellungen fehlgeschlagen
adi_matrix_updated => Matrix-Einstellungen aktualisiert
adi_update_matrix => Matrix-Einstellungen aktualisieren

#@language es
adi_article_data => Datos del artículo
adi_article_highlighting => Resaltado del título del artículo
adi_article_limit => Máximo número de artículos
adi_article_matrix => Artículo Matrix
adi_article_selection => Selección de artículo
adi_article_tooltips => Tooltips en título de artículos
adi_article_update_fail => Fallo al actualizar el artículo
adi_articles_not_modified => No hubo artículos modificados
adi_articles_saved => Artículos guardados
adi_include_descendent_cats => Incluir categorías descendentes
adi_matrix => Matriz
adi_matrix_admin => Administrador de Artículos Matrix
adi_matrix_cfs_modified => Lista de campo personalizado modificado
adi_matrix_delete_fail => Fallo al intentar borrar la matriz
adi_matrix_deleted => Matriz borrada
adi_matrix_input_field_tooltips => Tooltips sobre campo personalizado
adi_matrix_name => Nombre de matriz
adi_matrix_update_fail => Fallo al intentar actualizar los ajustes de la matriz
adi_matrix_updated => Ajustes de la matriz actualizados
adi_matrix_validation_error => Campos no válidos ignorados
adi_update_matrix => Ajustes de actualización de matriz

#@language fr
adi_article_data => Données de l'article
adi_article_highlighting => Mise en évidence du titre de l'article
adi_article_limit => Nombre maximum d'articles
adi_article_matrix => Matrice d'article
adi_article_selection => Choix de l'article
adi_article_tooltips => Infobulle sur le titre de l'article
adi_article_update_fail => La mise à jour de l'article a échoué
adi_articles_not_modified => Aucun article n'a été modifié
adi_articles_saved => Article sauvegardé
adi_custom_condition => Condition personnalisée
adi_expiry => Expiration
adi_include_descendent_cats => Inclure les catégories descendantes
adi_matrix => Matrice
adi_matrix_admin => Gestionnaire des matrices d'article
adi_matrix_cfs_modified => Liste des champs personnalisés modifiée
adi_matrix_delete_fail => La suppression de la matrice a échoué
adi_matrix_deleted => Matrice supprimée
adi_matrix_input_field_tooltips => Infos-bulle sur les champs de saisie
adi_matrix_name => Nom de la matrice
adi_matrix_total_articles => Nombre d'articles dans la matrice :
adi_matrix_update_fail => La mise à jour des paramètres de la matrice a échoué
adi_matrix_updated => Les paramètres de la matrice ont été mis à jour
adi_matrix_validation_error => Les champs invalides ont été ignorés
adi_update_matrix => Mettre à jour les paramètres de la matrice

#@language it
adi_article_data => Campi degli articoli
adi_article_highlighting => Evidenziatura per gli articoli
adi_article_limit => Limite articolo
adi_article_selection => Selezione articoli
adi_article_tooltips => Tooltip per gli articoli
adi_article_update_fail => Aggiornamento articoli fallito
adi_articles_saved => Articoli salvati
adi_matrix => Matrice
adi_matrix_delete_fail => Cancellazione della matrice fallita
adi_matrix_deleted => Matrice cancellata
adi_matrix_name => Nome della matrice
adi_matrix_update_fail => Aggiornamento delle impostazioni delle matrici fallita
adi_matrix_updated => Impostazioni delle matrici aggiornate
adi_update_matrix => Aggiorna impostazioni Matrice

#@language ja
adi_article_data => 記事データ
adi_article_highlighting => 記事タイトルのハイライト
adi_article_limit => 記事の最大数
adi_article_matrix => Matrix記事
adi_article_selection => 記事のセクション
adi_article_tooltips => 記事タイトルのツールチップ
adi_article_update_fail => 記事の更新に失敗しました
adi_articles_not_modified => No articles modified
adi_articles_saved => 記事を保存しました
adi_custom_condition => カスタムした記事の状態
adi_expiry => 記事の公開期限
adi_include_descendent_cats => 子孫カテゴリを含める
adi_matrix_admin => Matrix記事の管理
adi_matrix_cfs_modified => カスタムフィールドリストの更新
adi_matrix_delete_fail => Matrixの削除に失敗しました
adi_matrix_deleted => Matrixを削除しました
adi_matrix_input_field_tooltips => 入力フィールドのツールチップ
adi_matrix_name => Matrixの名前
adi_matrix_total_articles => Matrix内の合計記事数:
adi_matrix_update_fail => Matrix設定の更新に失敗しました
adi_matrix_updated => Matrix設定を更新しました
adi_matrix_validation_error => 検証エラー
adi_update_matrix => 設定の更新

#@language ru
adi_article_data => Данные статьи
adi_article_selection => Выбор статьи
adi_article_update_fail => Статья не обновилась
adi_articles_saved => Статьи сохранены
adi_matrix => Матрица
adi_matrix_name => Название матрицы
adi_matrix_delete_fail => Матрица не удалена
adi_matrix_deleted => Матрица удалена
adi_matrix_update_fail => Настройки матрицы не обновились
adi_matrix_updated => Настройки матрицы обновились
adi_update_matrix => Обновить настройки матрицы

#@language sv
adi_article_data => Artikeldata
adi_article_limit => Maximalt antal artiklar
adi_article_selection => Artikelavdelning
adi_article_update_fail => Artikeluppdatering misslyckades
adi_articles_saved => Artikel sparad
adi_matrix => Matris
adi_matrix_delete_fail => Radering av matris misslyckades
adi_matrix_deleted => Matris raderad
adi_matrix_name => Matrisnamn
adi_matrix_update_fail => Uppdateringar för matrisens inställningar misslyckades
adi_matrix_updated => Matrisinställningar uppdaterade
adi_update_matrix => Uppdatera matrisinställningar

I’ve probably not captured all of the adi_matrix strings for each language, just grabbed a bunch as an example.

If you stick the admin-side and the plugin-specific strings for all languages into each plugin, they’ll be stored on your behalf with the plugin. Users will then be able to install languages and get the strings installed without you having to offer the ability within your plugin – although you can always do so if you wish, to allow new strings to be installed.

If you do that, I would advise to update your installation routine to install them in two places:

  1. Update the textpack column in the plugin(s) themselves to have the grabbed strings stored for future language changes by admins.
  2. Update each of the installed languages too as you do now. Look at the L10n/Lang.php and other lang functions (such as available()) around the patch to see how you can get the current installed / active languages and iterate over them. You can simply load the pack contents (use Textpack/Parser) and throw the result at installTextpack() which should do the trick.

There are a few strings missing such as edit_preferences, privileges, sort and sort_dir which presumably came from core before so you’ll need to add specific strings for those yourself.

The only other thing we have to figure out is what happens when plugins are deleted. You don’t want the [admin-side] strings to go. Maybe we can figure out a way to only delete them when there are no other plugins by the same author (lang string owner) but I’m not sure how robust that’ll be as it’d depend on all strings having the same owner, or all using the same prefix. In an ideal world, it’d be fine but we also have plugins maintained by other authors to contend with.

Currently it’s up to individual plugin lifecycle handlers, so each plugin will need to remove its own strings minus the [admin-side] ones. We’ll probably have to live with the admin-side ones being left behind in the DB, I guess, unless we can come up with something clever.

Last edited by Bloke (2018-03-18 14:04:48)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB