Skip to content

Commit

Permalink
#166 Add make-php script
Browse files Browse the repository at this point in the history
  • Loading branch information
inc2734 committed Mar 12, 2024
1 parent 4eacb43 commit b8c4079
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions bin/l10n.php
@@ -0,0 +1,16 @@
<?php
/**
* @package snow-monkey
* @author inc2734
* @license GPL-2.0+
*/

require_once( './wp-load.php' );

$mo_files = glob( __DIR__ . '/../languages/*.mo' );
foreach ( $mo_files as $mo_file ) {
$mo = \WP_Translation_File::transform( $mo_file, 'php' );
if ( $mo ) {
file_put_contents( path_join( dirname( $mo_file ), basename( $mo_file, '.mo' ) ) . '.l10n.php', $mo );
}
}
2 changes: 2 additions & 0 deletions languages/snow-monkey-forms-ja.l10n.php
@@ -0,0 +1,2 @@
<?php
return ['project-id-version'=>'Snow Monkey Forms','report-msgid-bugs-to'=>'https://wordpress.org/support/plugin/snow-monkey-forms','po-revision-date'=>'2024-01-19 14:27+0900','last-translator'=>'inc2734 <inc@2inc.org>','language-team'=>'inc2734 <inc@2inc.org>','language'=>'ja_JP','mime-version'=>'1.0','content-type'=>'text/plain; charset=UTF-8','content-transfer-encoding'=>'8bit','plural-forms'=>'nplurals=1; plural=0;','x-generator'=>'Poedit 3.4.2','x-poedit-basepath'=>'..','x-poedit-flags-xgettext'=>'--add-comments=translators:','x-poedit-wpheader'=>'snow-monkey-forms.php','x-poedit-sourcecharset'=>'UTF-8','x-poedit-keywordslist'=>'__;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2','x-poedit-searchpath-0'=>'.','x-poedit-searchpathexcluded-0'=>'node_modules','x-poedit-searchpathexcluded-1'=>'vendor','x-poedit-searchpathexcluded-2'=>'tests','x-poedit-searchpathexcluded-3'=>'dist','messages'=>['Add a label element and link it with a form field of your choice. Enter the id of the form field you want to link to.'=>'label 要素を追加し、任意のフォーム項目に紐付けます。紐付け先のフォーム項目の id を入力します。','Admin notification'=>'管理者通知','Administrator email'=>'管理者宛メール','An error occurred during file upload.'=>'ファイルのアップロード中にエラーが発生しました。','An unexpected problem has occurred.'=>'予期しない問題が発生しました。','Attachment of file failed.'=>'ファイルの添付に失敗しました。','Attributes'=>'属性','Auto reply email'=>'自動返信メール','Automatic reply notification'=>'自動返信通知','Back'=>'戻る','Back button label'=>'戻るボタンのラベル','Block settings'=>'ブロック設定','Body'=>'Body','Business'=>'Business','Choose file'=>'ファイルを選択','Clear'=>'解除','Complete'=>'完了画面','Complete !'=>'完了しました。','Confirm'=>'確認画面へ','Confirm button label'=>'確認ボタンのラベル','Default'=>'デフォルト','Delimiter'=>'区切り文字','Description'=>'説明','Description is also displayed on the confirmation screen'=>'説明を確認画面にも表示する','Direction'=>'方向','Display label column'=>'ラベルカラムを表示する','Enable if you want to group by fieldset and label by legend.'=>'fieldset でグループ化し legend でラベルを付けたい場合は有効化してください。','Enter the name attribute value of the installed email form field in the following format: {name}'=>'設置したEメール用フォームフィールドの name 属性値を次の形式で入力してください: {name}','Failed to send administrator email.'=>'管理者メールの送信に失敗しました。','Failed to send auto reply email.'=>'自動返信メールの送信に失敗しました。','For detail see %1$sreCAPTCHA%2$s.'=>'詳細については、%1$sreCAPTCHA%2$sを参照してください。','Form settings'=>'フォーム設定','Form style'=>'フォームスタイル','From (Email address)'=>'From(メールアドレス)','Grouping'=>'グループ化','Help'=>'ヘルプ','Horizontal'=>'横','Input'=>'入力画面','Invalid access.'=>'無効なアクセスです。','Label'=>'ラベル','Letter'=>'Letter','Make legend invisible'=>'legend を不可視化','No file chosen'=>'選択されていません','Number of lines'=>'行数','Open the form settings'=>'フォーム設定を開く','Optional'=>'任意','Optional. Character that separates each item.'=>'任意。各項目を区切る文字。','Optional. Initial value.'=>'任意。初期値。','Optional. Initial value. Enter in the following format: value%1$s'=>'任意。初期値。次の形式で入力: value%1$s','Optional. Maximum number of characters. If 0, not restricted.'=>'任意。最大文字数。0の場合、制限されません。','Optional. The width of this item. If 0, not restricted.'=>'任意。この項目の幅。0の場合、制限されません。','Please enter a valid URL.'=>'有効な URL を入力してください。','Please enter a valid email address.'=>'有効なメールアドレスを入力してください。','Please enter.'=>'入力してください。','Please try again later or contact your administrator by other means.'=>'後でもう一度やり直すか、他の方法で管理者に連絡してください。','Reply-To (Email address)'=>'Reply-To(メールアドレス)','Required'=>'必須','Required. Enter in the following format: "value" : "label"%1$s or value%1$s'=>'必須。次の形式で入力: “value” : “label”%1$s あるいは value%1$s','Required. Input a unique machine-readable name.'=>'必須。一意の機械読み取り可能な名前を入力してください。','Secret Key'=>'Secret Key','Select a form'=>'フォームを選択してください','Send'=>'送信する','Send button label'=>'送信ボタンのラベル','Sender'=>'送信者','Separate multiple classes with spaces.'=>'複数クラスを半角スペースで区切ります。','Settings saved.'=>'設定を保存しました。','Simple table'=>'Simple table','Site Key'=>'Site Key','Snow Monkey Forms'=>'Snow Monkey Forms','Subject'=>'件名','The Snow Monkey Forms is a mail form plugin for the block editor.'=>'Snow Monkey Forms はブロックエディターのためのメールフォームプラグインです。','There is a possibility of spamming.'=>'スパム送信の可能性があります。','To (Email address)'=>'To(メールアドレス)','Upload failed.'=>'アップロードに失敗しました。','Uploaded file'=>'アップロード済みのファイル','Use confirm page'=>'確認画面を使用する','Use progress tracker'=>'プログレストラッカーを使用する','Validation'=>'バリデーション','Vertical'=>'縦','When activated, the legend will not appear on the screen, but will be read by screen readers.'=>'有効にすると、legend は画面には表示されなくなりますがスクリーンリーダーには読まれます。','You can embed a submitted value in the following formats: '=>'送信された値は次の形式で埋め込むことができます: ','You can embed all submitted values ​​in the following format: '=>'送信されたすべての値を次のフォーマットで埋め込むことができます: ','autocomplete'=>'autocomplete','block titleCheckboxes'=>'チェックボックス','block titleComplete page'=>'完了画面','block titleFile'=>'ファイル','block titleForm'=>'フォーム','block titleItem'=>'項目','block titleRadio buttons'=>'ラジオボタン','block titleSelect'=>'セレクトボックス','block titleSnow Monkey Form'=>'Snow Monkey Form','block titleTel'=>'Tel','block titleText'=>'テキスト','block titleTextarea'=>'テキストエリア','block titleURL'=>'URL','block titleemail'=>'email','class'=>'class','form-field-labelEmail'=>'Eメール','form-field-labelMessage'=>'メッセージ','form-field-labelName'=>'お名前','https://2inc.org'=>'https://2inc.org','id'=>'id','inc2734'=>'inc2734','label for'=>'label for','maxlength'=>'maxlength','name'=>'name','options'=>'options','placeholder'=>'placeholder','progress-tracker1'=>'1','progress-tracker2'=>'2','progress-tracker3'=>'3','progress-trackerComplete'=>'完了','progress-trackerConfirm'=>'確認','progress-trackerInput'=>'入力','reCAPTCHA'=>'reCAPTCHA','reCAPTCHA protects your contact form from fraud and abuse.'=>'reCAPTCHA は問い合わせフォームを詐欺や悪用から保護します。','rows'=>'rows','size'=>'size','value'=>'value']];
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -70,6 +70,7 @@
"zip": "npm run clean:zip && npm run zip:pack && npm run zip:archive",
"make-pot": "npm run wp i18n -- make-pot . ./languages/snow-monkey-forms.pot",
"make-json": "rimraf languages/*.json && npm run wp -- i18n make-json ./languages/snow-monkey-forms-ja.po --no-purge",
"make-php": "npm run cli php -- wp-content/plugins/snow-monkey-forms/bin/l10n.php",
"browsersync": "browser-sync start -p 'localhost:8888' -f '**/*' 'dist/**'"
}
}

0 comments on commit b8c4079

Please sign in to comment.