admin-fscheck.tpl.php
9 years ago
admin-list.tpl.php
9 years ago
admin-nav.tpl.php
9 years ago
admin-opts.tpl.php
9 years ago
admin-poedit.tpl.php
9 years ago
admin-poinit.tpl.php
9 years ago
admin-root.tpl.php
9 years ago
admin-poinit.tpl.php
77 lines
| 1 | <?php |
| 2 | /** |
| 3 | * msginit locale selection screen |
| 4 | */ |
| 5 | $nav = array ( |
| 6 | __('Packages','loco-translate') => array( 'href' => LocoAdmin::uri() ), |
| 7 | __('Settings','loco-translate') => array( 'href' => LocoAdmin::uri( array(), 'settings' ), 'icon' => 'admin-settings' ), |
| 8 | // |
| 9 | $title => array( 'icon' => 'welcome-add-page' ), |
| 10 | ); |
| 11 | |
| 12 | /* @var $package LocoPackage */ |
| 13 | $argpair = $package->get_query(); |
| 14 | |
| 15 | ?> |
| 16 | <div class="wrap loco-admin loco-init"><?php |
| 17 | |
| 18 | // Main navigation |
| 19 | Loco::render('admin-nav', compact('nav') )?> |
| 20 | |
| 21 | <h2><?php |
| 22 | Loco::h( __('Initialize new translations in %s','loco-translate'), $domain )?> |
| 23 | </h2> |
| 24 | |
| 25 | |
| 26 | <form action="" method="get" class="wp-core-ui" id="loco-msginit"> |
| 27 | <input type="hidden" name="page" value="<?php Loco::h( Loco::NS )?>" /> |
| 28 | <input type="hidden" name="msginit" value="<?php Loco::h( $domain )?>" /><?php |
| 29 | foreach( $argpair as $k => $v ):?> |
| 30 | <input type="hidden" name="<?php Loco::h($k)?>" value="<?php Loco::h($v)?>" /><?php |
| 31 | endforeach?> |
| 32 | <p> |
| 33 | <select name="common-locale"> |
| 34 | <option value=""> |
| 35 | <?php Loco::h( __('Select from common languages','loco-translate') )?> |
| 36 | </option><?php |
| 37 | foreach( $locales as $code => $name ):?> |
| 38 | <option value="<?php echo $code?>"> |
| 39 | <?php Loco::h( $name ) ?> |
| 40 | </option><?php |
| 41 | endforeach?> |
| 42 | </select> |
| 43 | </p> |
| 44 | <p> |
| 45 | <label for="f-loco-locale"> |
| 46 | – |
| 47 | <?php Loco::h( _x('or enter any language code','Form label','loco-translate') )?>: |
| 48 | <br /> |
| 49 | </label> |
| 50 | <input type="text" maxlength="6" size="8" pattern="^[a-zA-Z]{2,3}([\-_][a-zA-Z]{2})?$" name="custom-locale" for="f-loco-locale" placeholder="xx_XX" /> |
| 51 | <span class="icon flag"></span> |
| 52 | </p><?php |
| 53 | |
| 54 | // provide location choice if package and global dirs are both writable |
| 55 | if( $pdir_ok && $gdir_ok ):?> |
| 56 | <p> |
| 57 | <label> |
| 58 | <input type="radio" name="gforce" value="0"<?php print( $is_global ? '' : ' checked')?><?php print( $pdir_ok ? '' : ' disabled')?> /> |
| 59 | <?php echo sprintf( _x('create in <code>%s</code>','Form label','loco-translate' ), LocoAdmin::trim_path($pdir) )?> |
| 60 | </label> |
| 61 | <br /> |
| 62 | <label> |
| 63 | <input type="radio" name="gforce" value="1"<?php print( $is_global ? ' checked' : '') ?><?php print( $gdir_ok ? '' : ' disabled')?> /> |
| 64 | <?php Loco::h( _x('create in global languages directory','Form label','loco-translate') )?> |
| 65 | <code><?php Loco::h(LocoAdmin::trim_path($gdir))?>/</code> |
| 66 | </label> |
| 67 | </p><?php |
| 68 | endif?> |
| 69 | |
| 70 | <p class="submit"> |
| 71 | <input type="submit" value="<?php Loco::h( _x('Start translating','Submit button','loco-translate') )?>" class="button button-primary button-large" disabled /> |
| 72 | </p> |
| 73 | </form> |
| 74 | |
| 75 | |
| 76 | </div> |
| 77 |