gleef pull command downloads the latest approved translations from Gleef and updates your local localization files.
Usage
Options
| Flag | Short | Description |
|---|---|---|
--add-new | -a | Creates new localization keys if they are not in the current locale files |
--check | -c | Checks for new translations without updating them (returns error if translations are missing) |
--match | -m | Filter incoming translations by key pattern |
--namespace | -n | Filter translations by namespace/file pattern (e.g., “auth” or “auth|common”) |
What it does
Thepull command:
- Fetches remote state - Gets the latest translations from Gleef
- Compares changes - Identifies modified and new translations
- Shows preview - Displays what will be updated (unless using
--check) - Updates files - Applies changes to your local localization files
Basic Usage
Pull Updates Only
Add New Translations
Filter by Key Pattern
Filter by Namespace
Check for Updates
Example Output
Updates Available
New Keys Available (with —add-new)
Nothing to Update
Check Mode
The —add-new Flag
By default,pull only updates existing keys. Use --add-new to also add new keys:
Without —add-new (default)
- ✅ Updates existing translation values
- ❌ Ignores new keys created remotely
- ✅ Safe for stable releases
With —add-new
- ✅ Updates existing translation values
- ✅ Adds new keys created remotely
- ⚠️ May require code changes to handle new keys
Filtering Options
Pattern Matching with —add-new
When using--add-new, you can filter which new keys to add:
Namespace Filtering
Filter translations by namespace/file pattern. This is useful when you have multiple namespaced files per locale:Multiple File Namespaces
If your project has multiple files per locale, you’ll be prompted to choose where new keys should be added:Conflict Prevention
Thepull command is designed to be safe:
- Shows preview - Always shows what will change before applying
- Requires confirmation - Asks before overwriting local changes
- Preserves formatting - Maintains your file structure and indentation
- Atomic updates - Either all changes apply or none do
Examples
Feature Integration
Namespace-Specific Updates
Release Preparation (No CI)
CI/CD Integration
Error Handling
Common Errors
No Changes Error:gleef init or check your .gleef/config.json
Troubleshooting
Large Number of Changes
If you see many unexpected changes:- Check recent activity - Review what happened in Gleef Studio
- Use patterns - Pull specific sections with
--match - Coordinate with team - Ensure you’re not missing context
Missing Translations
If expected translations aren’t appearing:- Use —add-new flag - New keys require the
--add-newflag - Check patterns - Ensure your
--matchpattern is correct - Verify approval - Translations must be approved in Gleef Studio
File Conflicts
If you have local changes that conflict:- Commit local changes - Save your work before pulling
- Review differences - Understand what changed remotely
- Merge carefully - Decide which version to keep