Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Complete Japanese language pack for MikoPBX including UI translations and voice prompts

NotificationsYou must be signed in to change notification settings

mikopbx/ModuleJapaneseLanguagePack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MikoPBXLicenseModule Type

Complete Japanese language support module for MikoPBX including UI translations and voice prompts.

📦 Package Contents

  • 15 Translation Files (Messages/ja/)

    • Complete Japanese UI translations for all system components
    • Multi-file translation structure for better organization
  • 612 Sound Files (Sounds/ja-jp/)

    • Professional Japanese voice prompts
    • Full coverage of system messages, digits, letters, and phonetic alphabet

🎯 Module Type

This is aLanguage Pack module (module_type: "languagepack").

Language Pack modules have special behavior:

  • ✅ Sound files installedWITHOUT prefix (replace/extend system sounds)
  • ✅ OnlyONE Language Pack per language allowed (conflict prevention)
  • ✅ Automatic installation and removal
  • ✅ No additional configuration required

📋 Requirements

  • MikoPBX: 2025.1.1 or higher
  • Language Code:ja-jp (Japanese)

🚀 Installation Methods

1. MikoPBX Marketplace (Recommended)

  1. Open MikoPBX admin interface
  2. Navigate toSystemExtension ModulesMarketplace
  3. Search for "Japanese Language Pack"
  4. ClickInstall and thenEnable

2. ZIP Archive Upload

  1. Download the latest release ZIP fromGitHub Releases
  2. Open MikoPBX admin interface
  3. Navigate toSystemExtension Modules
  4. ClickUpload Module
  5. Select the downloaded ZIP file
  6. ClickInstall and thenEnable

ZIP Structure:

ModuleJapaneseLanguagePack.zip└── ModuleJapaneseLanguagePack/    ├── module.json    ├── ModuleJapaneseLanguagePackConf.php    ├── Setup/    ├── Messages/    ├── Sounds/    └── ...

3. GitHub Release (Direct Download)

# Download latest releasecd /tmpwget https://github.com/mikopbx/ModuleJapaneseLanguagePack/releases/latest/download/ModuleJapaneseLanguagePack.zip# Upload through web interface or extract manuallyunzip ModuleJapaneseLanguagePack.zip -d /storage/usbdisk1/mikopbx/custom_modules/chown -R www:www /storage/usbdisk1/mikopbx/custom_modules/ModuleJapaneseLanguagePackchmod -R 755 /storage/usbdisk1/mikopbx/custom_modules/ModuleJapaneseLanguagePack

4. Manual Git Clone (Development)

cd /storage/usbdisk1/mikopbx/custom_modules/git clone git@github.com:mikopbx/ModuleJapaneseLanguagePack.gitcd ModuleJapaneseLanguagePackgit checkout develop# or specific version tagchown -R www:www /storage/usbdisk1/mikopbx/custom_modules/ModuleJapaneseLanguagePackchmod -R 755 /storage/usbdisk1/mikopbx/custom_modules/ModuleJapaneseLanguagePack

🔧 How It Works

Translation System

The module usesmulti-file translation structure for better organization:

Messages/└── ja/    ├── Common.php           # Common translations (50 KB)    ├── Extensions.php       # Extension-related (12 KB)    ├── GeneralSettings.php  # System settings (48 KB)    ├── Providers.php        # Providers (33 KB)    ├── Route.php           # Routes (45 KB)    ├── MailSettings.php    # Mail settings (18 KB)    ├── NetworkSecurity.php # Security (12 KB)    ├── Modules.php         # Modules (8 KB)    ├── ApiKeys.php         # API keys (7 KB)    ├── Passwords.php       # Passwords (5 KB)    ├── StoplightElements.php # UI elements (4 KB)    ├── AsteriskRestUsers.php # REST users (3 KB)    ├── Auth.php            # Authentication (minimal)    ├── Passkeys.php        # Passkeys (minimal)    └── RestApi.php         # REST API (minimal)

Loading Process:

  1. Core translations loaded fromsrc/Common/Messages/en/ andsrc/Common/Messages/ja/
  2. Module translations loaded fromMessages/ja/*.php
  3. All translation files merged automatically byMessagesProvider::loadModuleTranslations()

Sound Files System

Sound files are automatically managed bySoundFilesConf::installModuleSounds():

Sounds/└── ja-jp/    ├── hello.gsm    ├── goodbye.gsm    ├── vm-intro.gsm    ├── digits/    │   ├── 0.gsm    │   ├── 1.gsm    │   └── ... (more digits)    ├── letters/    │   ├── a.gsm    │   ├── b.gsm    │   └── ... (more letters)    ├── phonetic/    │   ├── alpha_1.gsm    │   └── ... (more phonetic)    └── ... (612 files total)

Installation Location:/mountpoint/mikopbx/media/sounds/ja-jp/

File Naming: Language Pack modules install fileswithout module prefix:

  • hello.gsmhello.gsm (direct replacement)
  • ❌ NOTmodulejapaneselanguagepack-hello.gsm

Using Japanese in Dialplan

After installation, Japanese becomes available system-wide:

publicfunctionextensionGenContexts():string{return"[japanese-greeting]\n" ."exten => *88,1,Answer()\n" ."\tsame => n,Set(CHANNEL(language)=ja-jp)\n" .// Set Japanese language"\tsame => n,Playback(hello)\n" .// Plays Japanese hello.gsm"\tsame => n,Playback(digits/5)\n" .// Plays Japanese "5""\tsame => n,Playback(goodbye)\n" .// Plays Japanese goodbye.gsm"\tsame => n,Hangup()\n\n";}

UI Language:Japanese translations become available in the web interface language selector after module installation.

🛡️ Conflict Prevention

The module automatically checks for conflicts during installation:

// Only one Japanese Language Pack allowed per system$conflict = PbxExtensionUtils::checkLanguagePackConflict('ModuleJapaneseLanguagePack','ja-jp');if ($conflict) {// Installation blocked - another Japanese pack existsthrownewException("Conflict with$conflict");}

Why? Language Pack modules replace system sounds without prefix. Multiple packs for the same language would overwrite each other's files.

📊 Technical Details

Module Structure

ModuleJapaneseLanguagePack/├── .github/                              # GitHub Actions workflows├── .gitignore                            # Git ignore rules├── module.json                           # Module metadata├── Lib/                                  # Module libraries│   └── ModuleJapaneseLanguagePackConf.php  # Module configuration class├── Setup/│   └── PbxExtensionSetup.php            # Installation logic├── Messages/│   └── ja/                              # Translation files (15 files)│       ├── Common.php│       ├── Extensions.php│       └── ...└── Sounds/    └── ja-jp/                           # Sound files (612 files)        ├── *.gsm        ├── digits/        ├── letters/        └── phonetic/

Module Configuration

module.json:

{"developer":"MIKO","moduleUniqueID":"ModuleJapaneseLanguagePack","support_email":"help@miko.ru","version":"%ModuleVersion%","min_pbx_version":"2025.1.1","module_type":"languagepack","language_code":"ja-jp","release_settings": {"publish_release":true,"changelog_enabled":true,"create_github_release":true  }}

Key Classes

  • ModuleJapaneseLanguagePackConf: Main module configuration
  • PbxExtensionSetup: Installation/uninstallation handler with conflict checking
  • PbxExtensionUtils: Language Pack detection and conflict prevention
  • MessagesProvider: Multi-file translation loading
  • SoundFilesConf: Sound file installation/removal

🔄 Uninstallation

Through Admin Interface

  1. Go toSystemExtension Modules
  2. Find "Japanese Language Pack"
  3. ClickDisable
  4. ClickUninstall

What Gets Removed

When you uninstall the module:

  • ✅ All translation files removed from memory cache
  • ✅ Entire/mountpoint/mikopbx/media/sounds/ja-jp/ directory deleted
  • ✅ Module files removed from/custom_modules/
  • ✅ Database record removed fromm_PbxExtensionModules

Note: After uninstallation, Japanese language will no longer be available in the system.

🌍 Creating Your Own Language Pack

Want to create a Language Pack for another language? Use this module as a template!

Quick Start

  1. Clone the repository:

    git clone git@github.com:mikopbx/ModuleJapaneseLanguagePack.git ModuleMyLanguagePackcd ModuleMyLanguagePack
  2. Update module.json:

    {"moduleUniqueID":"ModuleMyLanguagePack","module_type":"languagepack","language_code":"xx-xx"}
  3. Add your translations:

    Messages/xx/Common.phpMessages/xx/Extensions.php...
  4. Add your sound files:

    Sounds/xx-xx/hello.gsmSounds/xx-xx/goodbye.gsmSounds/xx-xx/digits/0.gsm...
  5. Update class names:

    • ModuleJapaneseLanguagePackConfModuleMyLanguagePackConf
    • ModuleJapaneseLanguagePack namespace →ModuleMyLanguagePack
  6. Test and deploy!

Translation File Format

Each translation file should return an associative array:

<?php// Messages/xx/Common.phpreturn ['ex_Save' =>'Guardar','ex_Cancel' =>'Cancelar','ex_Add' =>'Añadir',// ... more translations];

Sound File Requirements

  • Format: GSM, WAV, ULAW, ALAW, G722, SLN
  • Recommended: GSM (compact size, good quality)
  • Sample Rate: 8000 Hz
  • Channels: Mono

📝 Development

Building from Source

# Clone the repositorygit clone git@github.com:mikopbx/ModuleJapaneseLanguagePack.gitcd ModuleJapaneseLanguagePack# Switch to develop branchgit checkout develop# Build ZIP archivezip -r ModuleJapaneseLanguagePack.zip. \  -x"*.git*" \  -x"*.idea*" \  -x"*.DS_Store" \  -x"*node_modules*"

Version Management

Versions are managed through git tags:

git tag -a v1.0.0 -m"Release version 1.0.0"git push origin v1.0.0

GitHub Actions automatically creates releases from tags.

Contributing

  1. Fork the repository
  2. Create a feature branch:git checkout -b feature/my-feature
  3. Commit your changes:git commit -am 'Add new feature'
  4. Push to the branch:git push origin feature/my-feature
  5. Submit a Pull Request todevelop branch

📚 Related Documentation

  • MikoPBX Core:github.com/mikopbx/Core
  • Module Development: SeeCLAUDE.md in MikoPBX Core repository
  • Sound Files Guide: Module Development Docs → Sound Files Integration
  • Translation System: Common Providers Documentation

🐛 Troubleshooting

Installation Issues

Problem: "Another Japanese Language Pack is already installed"

  • Solution: Uninstall the existing Japanese pack first, then retry

Problem: "Sounds not playing in Japanese"

  • Solution:
    1. Check if module is enabled:SystemExtension Modules
    2. Verify language code in dialplan:Set(CHANNEL(language)=ja-jp)
    3. Check sound files exist:ls /mountpoint/mikopbx/media/sounds/ja-jp/

Problem: "Translations not showing in UI"

  • Solution:
    1. Clear browser cache
    2. Log out and log back in
    3. Check language selector in user profile
    4. Verify module is enabled

Debug Mode

Enable debug logging:

# Check module installation logsgrep"ModuleJapaneseLanguagePack" /var/log/mikopbx/messages# Check sound file installationls -lah /mountpoint/mikopbx/media/sounds/ja-jp/| head -20# Test specific sound fileasterisk -rx"console dial *88@test-context"

📄 License

GNU General Public License v3.0

SeeLICENSE file for details.

👨‍💻 Developer

MIKO

🙏 Acknowledgments

  • Japanese translations provided by professional translators
  • Voice prompts recorded by native Japanese speakers
  • Built onMikoPBX open-source PBX platform

Version: %ModuleVersion%Language: Japanese (ja-jp)Module Type: Language PackFiles: 15 translations + 612 soundsRepository:github.com/mikopbx/ModuleJapaneseLanguagePack

About

Complete Japanese language pack for MikoPBX including UI translations and voice prompts

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp