{"id":20268,"library":"po-gettext-loader","title":"po-gettext-loader","description":"A webpack loader that converts GNU gettext PO files to JSON using gettext-parser. Version 1.0.0 is the latest stable release, published once. It integrates into webpack build pipelines for i18n workflows, outputting JSON that can be further processed by json-loader. Simpler than using gettext tools directly, but has no active maintenance or updates. Differentiates by offering a direct Webpack integration without additional configuration.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/cah4a/po-gettext-loader","tags":["javascript","webpack","loader","gettext"],"install":[{"cmd":"npm install po-gettext-loader","lang":"bash","label":"npm"},{"cmd":"yarn add po-gettext-loader","lang":"bash","label":"yarn"},{"cmd":"pnpm add po-gettext-loader","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core library for parsing .po files into JSON","package":"gettext-parser","optional":false}],"imports":[{"note":"Webpack loaders are typically used in webpack config, not imported directly. This default export is the loader function.","wrong":"const PoGettextLoader = require('po-gettext-loader')","symbol":"default","correct":"import PoGettextLoader from 'po-gettext-loader'"}],"quickstart":{"code":"// webpack.config.js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.po$/,\n        use: [\n          { loader: 'json-loader' },\n          { loader: 'po-gettext-loader' }\n        ]\n      }\n    ]\n  }\n};\n// Then import .po files:\nimport translations from './messages.po';","lang":"javascript","description":"Shows webpack configuration to load .po files, converting them to JSON then bundling."},"warnings":[{"fix":"Add json-loader in the use array after po-gettext-loader as shown in quickstart","message":"Requires json-loader to be chained after po-gettext-loader, else webpack cannot handle the output","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider using @formatjs/intl-gettext-loader or writing a custom loader","message":"Package is not actively maintained; last publish in 2018","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Chain with json-loader as shown","message":"Loader output is a JSON string, not a JavaScript object; must be used with json-loader or similar","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.0':21 'activ':58 'addit':70 'build':33 'configur':71 'convert':9 'differenti':62 'direct':54,66 'file':13 'gettext':3,11,18,52,75 'gettext-pars':17 'gnu':10 'i18n':36 'integr':30,68 'javascript':72 'json':15,39,47 'json-load':46 'latest':24 'loader':4,7,48,74 'mainten':59 'offer':64 'output':38 'parser':19 'pipelin':34 'po':2,12 'po-gettext-load':1 'process':44 'publish':27 'releas':26 'simpler':49 'stabl':25 'tool':53 'updat':61 'use':16,51 'version':20 'webpack':6,32,67,73 'without':69 'workflow':37","created_at":"2026-04-25T11:22:13.066369+00:00","updated_at":"2026-04-25T11:22:13.066369+00:00","problems":[{"fix":"Add json-loader to the rule: { test: /\\.po$/, use: [ 'json-loader', 'po-gettext-loader' ] }","cause":"Missing json-loader after po-gettext-loader","error":"Module parse failed: Unexpected token (1:1)\nYou may need an appropriate loader to handle this file type."},{"fix":"Run npm install gettext-parser --save-dev","cause":"Missing peer dependency gettext-parser","error":"Error: Cannot find module 'gettext-parser'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/cah4a/po-gettext-loader","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/po-gettext-loader","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}