Come creare file .pot con POedit?
-
-
Prova [Creazione difile POT] (https://codex.wordpress.org/User:Skippy/Creating_POT_Files).Try [Creating POT Files](https://codex.wordpress.org/User:Skippy/Creating_POT_Files).
- 0
- 2016-01-11
- WisdmLabs
-
10 risposta
- voti
-
- 2014-06-11
Puoiprovare Eazy Po .
- Dalmenu File seleziona "Nuovo dafile codice sorgente ..".
- Nellafinestra di xgettext Command Manager;Premere "Sfoglia cartella"per selezionare la cartella di origine dibase.
- Nel riquadro Buildpremiilpulsante "Esegui comando"pergenerareilfile Pot.
You may try Eazy Po.
- From file menu select “New from source code files..”.
- In xgettext Command Manager window; Press “Browse folder” to select base source folder.
- In Build pane press “Execute Command” button to generate Pot file.
-
Moltomeglioe piùfacile di POEdit.UIpulita.Hatutte lefunzioni ditraduzionei18nnell'elenco delleparole chiaveperimpostazionepredefinita.Grazie.Much better and easier than POEdit. Clean UI. Has all the i18n translation functions in the keyword list by default. Thank you.
- 0
- 2018-10-01
- Paras Shah
-
Utilizzato questo dopo aver realizzato che lefunzionalità di WordPress di POEdit sono apagamento.Hafunzionatoperfettamente!Used this after realizing that POEdit's WordPress features are paid. Worked perfectly!
- 1
- 2018-11-30
- Swen
-
Hafunzionatoperfettamente ancheperme ed èpiùfacile,moltopiùfacile di quantonon lo sia.Worked perfectly for me too and easier, very easier than poedit.
- 0
- 2020-04-17
- Loc_rabbirt
-
- 2014-11-23
Ecco come creare unfile .potperiltuotema con Poedit (edizionegratuita,versione 1.6.10) su OS X.
Lamigliorepratica è salvarei file di linguain una cartella denominata "languages"nella directory deltema. Senon l'haigiàfatto,crealoprima diiniziare.
In Poedit:
- Nelmenu "File" seleziona "Nuovo"
- Seleziona la lingua che hai utilizzatoneltema (probabilmenteinglese)
- Nelmenu "Catalogo" seleziona "Proprietà"
- Inserisci leinformazioni sulprogettonella scheda "Proprietàtraduzione"
- Vai allaterza scheda "Parole chiave dellefonti"
- Fai clic sulpulsante "Nuovoelemento" (secondopulsante),inserisci unaparola chiavee ripeti l'operazioneper ciascuna delletueparole chiave (
__
,_e
,esc_attr_e
,ecc.) - Fai clic sulpulsante "OK"in basso
- Nelmenu "File" seleziona "Salva connome .."
- Salvailfile come "yourthemename.pot"nella cartella "languages"nella directory deltuotema (assicurati di aggiungere l'estensione .pot alnome delfileperchéperimpostazionepredefinita salverà come .po)
- Nelmenu "Catalogo" seleziona dinuovo "Proprietà"
- Vai alla seconda scheda "Percorsi delle sorgenti"
- Impostail valoreper "Basepath" su
../
(ilfile .pot viene salvatoin una sottodirectory quindiin questomodoimposti labase sulla directoryprincipale,cioè la directory deltuotema) - Accanto a "Percorso"fai clic sulpulsante "Nuovoelemento"e inserisci
.
(questofaràeseguire la scansione della directory deltemae delle sue sottodirectory) - Fai clic sulpulsante "OK"in basso
- Nellafinestra delprogettofai clic su "Aggiorna" (secondaiconain alto)
- Nelmenu "File"fai clic su "Salva"
Eilgioco èfatto :)
Here is how you can create a .pot file for your theme with Poedit (free edition, version 1.6.10) on OS X.
Best practise is to save language files in a folder named "languages" in your theme directory. If you haven't already, create it before you start.
In Poedit:
- In the "File" menu select "New"
- Select the language that you used in your theme (probably English)
- In the "Catalog" menu select "Properties"
- Enter the project information in the "Translation properties" tab
- Go to the 3rd tab "Sources keywords"
- Click on the "New item" button (2nd button) and enter a keyword and repeat this for each of your keywords (
__
,_e
,esc_attr_e
, etc.) - Click on the "OK" button at the bottom
- In the "File" menu select "Save As.."
- Save the file as "yourthemename.pot" in the "languages" folder in your theme directory (make sure you add the .pot extension to the filename because by default it will save as .po)
- In the "Catalog" menu select "Properties" again
- Go to the 2nd tab "Sources paths"
- Set the value for "Base path" to
../
(the .pot file is saved in a subdirectory so this way you set the base to the parent directory, ie. your theme directory) - Next to "Path" click on the "New item" button and enter
.
(this will make it scan your theme directory and its subdirectories) - Click on the "OK" button at the bottom
- In the project window click on "Update" (2nd icon at the top)
- In the "File" menu click "Save"
And you're done :)
-
Questononfunzionaper WordPresse lemodifiche specifiche al sistema ditraduzione.Nellamigliore delleipotesi èincompleto.This does not work for WordPress and the specific changes to the translation system. It is incomplete at best.
- 0
- 2016-01-30
- Otto
-
Hafunzionatomoltobene perilmiopluginIt worked really well for my plugin
- 1
- 2017-01-17
- Pablo S G Pacheco
-
Funzionaperilplugin,manontraduce la descrizione delplugin dall'intestazioneIt works for the plugin, but doesnt translate the plugin description from header
- 0
- 2018-02-27
- Awsme Sandy
-
- 2014-11-23
Puoifarlo congli strumenti di WordPress,senza POEdit.
Perprima cosa,esegui un checkout svn di http://develop.svn.wordpress.org/trunk/:
svn co http://develop.svn.wordpress.org/trunk/ wpdev
Quindi,passa alla directory degli strumentii18n al suointerno:
cd wpdev/tools/i18n/
Quindieseguiilmakepot.php sulla directory deltuotema:
php makepot.php wp-theme /path/to/your/theme themename.pot
Questo creerà unfilethemename.potperte.Usaloin qualsiasi strumento ditraduzione standard cheti piace.
Èmeglioperché utilizzail codice WordPresspertrovare lefunzionii18n,quindinonte neperderainessuna.Inoltre,troveràe aggiungerà cose come leinformazioni sull'intestazione deltema,comeilnome,la descrizione,ecc. Ciò consente ditradurre anche quelle.Assicurati diincludere l'intestazione "Text Domain:"neltuo style.css affinchéfunzionino.
You can do this with the WordPress tools, without POEdit.
First, do an svn checkout of http://develop.svn.wordpress.org/trunk/:
svn co http://develop.svn.wordpress.org/trunk/ wpdev
Then, switch to the i18n tools directory in it:
cd wpdev/tools/i18n/
Then just run the makepot.php over your theme's directory:
php makepot.php wp-theme /path/to/your/theme themename.pot
This will create a themename.pot file for you. Use it in any standard translating tool you like.
This is better because it uses the WordPress code to find the i18n functions, so you won't miss any of them. Additionally, it will find and add things like the theme header information, such as the name, description, etc. This allows for those to be translated too. Make sure you include the "Text Domain:" header in your style.css for those to work.
-
funzionerà ancheper unplugin?will this work for a plugin too?
- 0
- 2014-12-25
- Maruti Mohanty
-
Sì,usa semplicemente "wp-plugin"invece di "wp-theme"e genererà unfile POTper unplugin.Yes, just use "wp-plugin" instead of "wp-theme" and it will generate a POT file for a plugin.
- 2
- 2014-12-25
- Otto
-
Ogni altrometodo chenon utilizzagli strumenti specifici di WordPress èin qualchemodo rotto.Every other method that does not use the WordPress specific tools is broken in some way.
- 0
- 2016-01-30
- Otto
-
Strumentifantastici!Anche se continuava a lanciareerrori come "Impossibilegenerareilfile" anche se ho `chmod + x` le directory ..Awesome tools! Though it kept throwing errors like "Couldn't generate file" even though I `chmod +x` the directories..
- 0
- 2016-12-22
- Samuel Elh
-
Perché chmod + x dovrebbe aiutare?Forse dovrestiprovare a rendere la directory scrivibileinvece cheeseguibile.Why would chmod +x help? Maybe you should try making the directory writable instead of executable.
- 1
- 2016-12-23
- Otto
-
Grazie Otto,nonne sono statoinformato,ma ora sono su Ubuntue funzionaperfettamente!Thanks Otto, I didn't get notified of that, but now I am on Ubuntu and this works rather perfect!
- 0
- 2017-01-25
- Samuel Elh
-
Ho seguitogli stessipassaggi,hotradottotuttomanon è statopossibiletradurre la descrizione delplug-innella sezione dell'intestazione delplug-in.Followed the same steps, translated everything but unbale to translate the plugin description in the header section of the plugin.
- 0
- 2018-02-27
- Awsme Sandy
-
Se staitraducendo unplugin,assicurati di usare "wp-plugin"nel comandoin modo che sappia qualiintestazioni cercare.If you're translating a plugin, make sure you use "wp-plugin" in the command so that it knows what headers to look for.
- 0
- 2018-02-27
- Otto
-
- 2018-12-11
Ho scoperto cheilmodopiù semplice ora è utilizzare WP-CLI .Passa altuotema opluginedeseguiil seguente comando (dopo averinstallato WP-CLI):
wp i18n make-pot . languages/my.pot
(Vedi la documentazione del comando)
Puoi quindimodificare questofile con Poedit o qualsiasi altro utile strumento ditraduzione.
I found the easiest way now is to use the WP-CLI. Navigate to your theme or plugin and execute the following command (after WP-CLI is installed):
wp i18n make-pot . languages/my.pot
(See documentation of the command)
You can then edit this file with Poedit or any other handy translation tool.
-
questa dovrebbeessere lanuova risposta accettatathis should be the new accepted answer
- 0
- 2020-05-26
- maysi
-
- 2015-07-13
Puoieliminare completamentegli strumentiesterni conilplugin Loco Translate .L'hoprovato circa un annofae da alloranon hopiù usato POEdit.Installalo sultuo sito diprovae creailfile POT con un clic.
You can drop external tools altogether with Loco Translate plugin. I've tried it about a year ago and never used POEdit since. Install it on your test site and create POT file with one click.
-
Questononfunzionaper WordPresse lemodifiche specifiche al sistema ditraduzione.Nellamigliore delleipotesi èincompleto.This does not work for WordPress and the specific changes to the translation system. It is incomplete at best.
- 0
- 2016-01-30
- Otto
-
Woot?È unplugin WP.Woot? It's a WP plugin.
- 0
- 2017-10-16
- certainlyakey
-
- 2016-03-31
Per chiunque avesse voluto usare Poeditinvece di Easy Po.
- Scarica (ultima versione di) Poedite installa
-
Vai afile> Nuovo.Apparirà unanuova scheda,scegli latua lingua ditraduzionee salva (ctrl + s)nella cartellaprincipale deltuotema wordpress.
-
Nellapagina successiva,fare clic su - "Estrai da sorgenti".La scheda che vedrai dopo è simile a quelle utilizzatenei link che haiincollato."Informazioni sulprogetto" ora è "Proprietàtraduzione",così come "Percorsi"e "Parole chiave" sono rispettivamente "Percorsi di origine"e "Parole chiave di origine"
For anyone who had like to use Poedit instead of Easy Po.
- Download (latest version of) Poedit and Install
Go to file>New. A new tab will come up, choose your language of translation and Save (ctrl + s) to the root folder of your wordpress theme.
On the page you will see next, Click on - "Extract from sources". The tab you will see next is similar to those used in the links you pasted. "Project Info" is now "Translation Properties", as well as "Paths" and "Keywords" are "Sources Paths" and "Sources keywords" respectively
-
- 2016-10-18
Ho lo stessoproblema,la soluzione ènellaprima scheda quandoestraiil catalogo,dovrestimettere UTF8 consigliatoe nella 3a scheda "Parole chiave dellefonti",fai clic sulpulsante "Nuovoelemento" (secondopulsante)e inserisci unparola chiavee ripeti l'operazioneper ciascuna delletueparole chiave (__,_e).
I have same problem, the solution is in the first tab when you extract catalog, should put UTF8 recommanded, and in the 3th tab "Sources keywords", click on the "New item" button (2nd button) and enter a keyword and repeat this for each of your keywords (__, _e).
-
- 2017-03-02
Come ha detto Otto :
Pergli utenti Mac ,farei qualcosa deltipo:
- Dopo l'installazione da
svn co http://develop.svn.wordpress.org/trunk/wpdev
<"So..."
- Crea directory
/languages /
sultuotema - Crea unfile di comando come
lang.command
in quella/languages /
dir - All'interno di
lang.command
aggiungi un codice simile a questo ..
#!/bin/bash cd $ (nome directory "$ 0") php/Users/YOUNAME/wpdev/tools/i18n/makepot.php wp-theme ../../mythememytheme.pot PS: modificailpercorso makepot.php correttoe il mytheme conilnome deltema
Ora ogni volta che vuoi creare unnuovofile .POT ,puoi semplicementeeseguire lang.command"
As Otto said :
For Mac users, I would do something like :
- After installed by
svn co http://develop.svn.wordpress.org/trunk/ wpdev
So...
- Make
/languages/
dir on your theme - Make a command file like
lang.command
in that/languages/
dir - Inside
lang.command
add code something like this..
#!/bin/bash cd $(dirname "$0") php /Users/YOUNAME/wpdev/tools/i18n/makepot.php wp-theme ../../mytheme mytheme.pot
PS: Change your correct makepot.php path and mytheme to your theme name
Now everytime you want to make a new .POT file, you can just ran lang.command
-
- 2020-05-09
Un'altra soluzione alternativaper crearefile .potper lepersone chepreferiscono NPM è wp-pot .Vienefornito con una serie di opzioni chepuoimodificare atuopiacimento.Super semplice da configurare.
Another alternative solution to create .pot files for folks who prefer NPM is wp-pot. It comes with a bunch of options that you can tweak to your liking. Super simple to set up.
-
- 2014-06-11
Prova questopost: Crea unfile .pot o .po utilizzandoPoedit .Descriveilflusso di lavoroe indica chei file .poe .pot sonogli stessi.
Perimpostazionepredefinita Poedit salvailtuofile comefile .pomapoichéi duefile sonoidenticipuoi aggirareilproblema semplicemente scegliendo di salvareilfile .po comefile .pot
Try this post: Create a .pot or .po File using Poedit. It describes the workflow, and indicates .po and .pot files are the same.
By default Poedit saves your file as a .po file but since the two files are identical you can get around that by simply choosing to save the .po file as a .pot file
-
Questononfunzionaper WordPresse lemodifiche specifiche al sistema ditraduzione.Nellamigliore delleipotesi èincompleto.This does not work for WordPress and the specific changes to the translation system. It is incomplete at best.
- 0
- 2016-01-30
- Otto
Hopassato ore oggi a quello che sembrava qualcosa di veramente semplice,ovvero creare unfile .potper untema Wordpress che sto creando. Ho letto l ' articolo di Smashing Magazine ,l' articolo di Tutsplus e pochi altri su come utilizzare Poedit per crearefile .potper untema,quindi crearefile .moe .po,mapurtroppo sono ancorabloccato alprimopassaggio.
Hoinstallato Poedite trovo che l'interfaccia utente sia completamente diversa da quellamostratain tuttii tutoriale sembra chenon ci siapiù un'opzioneper creareilfile .pot. L'unica cosa disponibile è crearefile .poe .mo da unfile .potesistente,chenon è ciò di cui hobisogno ora.
Quindi qualcunopuò dirmi comeposso crearefile .pot usando Poedit o con qualche altrometodo,lo apprezzerei davvero.
Grazie!