Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
dmason30 committed Oct 6, 2023
1 parent a5a3b8e commit 97b7bb1
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 61 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
6 unused translations found
+--------+-----------+------------------------------------+-------------+
| Locale | Namespace | Key | Value |
+--------+-----------+------------------------------------+-------------+
| en | | example.unused | I am unused |
| en | | example.blade.choice.unused | I am unused |
| en | | example.blade.lang.unused | I am unused |
| en | | folder/example.unused | I am unused |
| en | | folder/example.blade.choice.unused | I am unused |
| en | | folder/example.blade.lang.unused | I am unused |
+--------+-----------+------------------------------------+-------------+
8 unused translations found
+--------+-----------+------------------------------------+------------------------------+
| Locale | Namespace | Key | Value |
+--------+-----------+------------------------------------+------------------------------+
| en | | example.unused | I am unused in php class |
| en | | example.blade.choice.unused | I am unused in blade |
| en | | example.blade.lang.unused | I am unused in blade |
| en | | example.vue.unused | I am unused in vue component |
| en | | folder/example.unused | I am unused in php class |
| en | | folder/example.blade.choice.unused | I am unused in blade |
| en | | folder/example.blade.lang.unused | I am unused in blade |
| en | | folder/example.vue.unused | I am unused in vue component |
+--------+-----------+------------------------------------+------------------------------+
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6 unused translations found
8 unused translations found
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
12 unused translations found
+--------+-----------+------------------------------------+-----------------------+
| Locale | Namespace | Key | Value |
+--------+-----------+------------------------------------+-----------------------+
| en | example | example.unused | I am unused in vendor |
| en | example | example.blade.choice.unused | I am unused in vendor |
| en | example | example.blade.lang.unused | I am unused in vendor |
| en | example | folder/example.unused | I am unused |
| en | example | folder/example.blade.choice.unused | I am unused |
| en | example | folder/example.blade.lang.unused | I am unused |
| en | | example.unused | I am unused |
| en | | example.blade.choice.unused | I am unused |
| en | | example.blade.lang.unused | I am unused |
| en | | folder/example.unused | I am unused |
| en | | folder/example.blade.choice.unused | I am unused |
| en | | folder/example.blade.lang.unused | I am unused |
+--------+-----------+------------------------------------+-----------------------+
16 unused translations found
+--------+-----------+------------------------------------+------------------------------+
| Locale | Namespace | Key | Value |
+--------+-----------+------------------------------------+------------------------------+
| en | example | example.unused | I am unused in php class |
| en | example | example.blade.choice.unused | I am unused in blade |
| en | example | example.blade.lang.unused | I am unused in blade |
| en | example | example.vue.unused | I am unused in vue component |
| en | example | folder/example.unused | I am unused in php class |
| en | example | folder/example.blade.choice.unused | I am unused in blade |
| en | example | folder/example.blade.lang.unused | I am unused in blade |
| en | example | folder/example.vue.unused | I am unused in vue component |
| en | | example.unused | I am unused in php class |
| en | | example.blade.choice.unused | I am unused in blade |
| en | | example.blade.lang.unused | I am unused in blade |
| en | | example.vue.unused | I am unused in vue component |
| en | | folder/example.unused | I am unused in php class |
| en | | folder/example.blade.choice.unused | I am unused in blade |
| en | | folder/example.blade.lang.unused | I am unused in blade |
| en | | folder/example.vue.unused | I am unused in vue component |
+--------+-----------+------------------------------------+------------------------------+
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
6 unused translations found
8 unused translations found
+-----------+------------------------------------+
| Namespace | Key |
+-----------+------------------------------------+
| | example.unused |
| | example.blade.choice.unused |
| | example.blade.lang.unused |
| | example.vue.unused |
| | folder/example.unused |
| | folder/example.blade.choice.unused |
| | folder/example.blade.lang.unused |
| | folder/example.vue.unused |
+-----------+------------------------------------+
17 changes: 10 additions & 7 deletions workbench/lang/en/example.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
<?php

return [
'used' => 'I am used',
'unused' => 'I am unused',

'used' => 'I am used in php class',
'unused' => 'I am unused in php class',
'blade' => [
'choice' => [
'used' => 'I am used',
'unused' => 'I am unused',
'used' => 'I am used in blade',
'unused' => 'I am unused in blade',
],
'lang' => [
'used' => 'I am used',
'unused' => 'I am unused',
'used' => 'I am used in blade',
'unused' => 'I am unused in blade',
],
],
'vue' => [
'used' => 'I am used in vue component',
'unused' => 'I am unused in vue component',
],
];
17 changes: 10 additions & 7 deletions workbench/lang/en/folder/example.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
<?php

return [
'used' => 'I am used',
'unused' => 'I am unused',

'used' => 'I am used in php class',
'unused' => 'I am unused in php class',
'blade' => [
'choice' => [
'used' => 'I am used',
'unused' => 'I am unused',
'used' => 'I am used in blade',
'unused' => 'I am unused in blade',
],
'lang' => [
'used' => 'I am used',
'unused' => 'I am unused',
'used' => 'I am used in blade',
'unused' => 'I am unused in blade',
],
],
'vue' => [
'used' => 'I am used in vue component',
'unused' => 'I am unused in vue component',
],
];
14 changes: 14 additions & 0 deletions workbench/resources/js/ExampleComponent.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<template>
{{ __('example.vue.used', {foo: 'bar'}) }}
{{ __(
'folder/example.vue.used',
{foo: 'bar'}
)}}
</template>

<script setup>
const exampleA = computed(() => __('example::example.vue.used'))
const exampleB = computed(() => __(
'example::folder/example.vue.used'
))
</script>
3 changes: 2 additions & 1 deletion workbench/resources/views/welcome.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@lang('example.blade.lang.used')
@lang('example.blade.lang.used', ['foo' => 'bar'])
@lang(
'folder/example.blade.lang.used',
['foo' => 'bar'],
)
@lang('example::example.blade.lang.used')
@lang(
Expand Down
19 changes: 11 additions & 8 deletions workbench/vendor/example/lang/en/example.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
<?php

return [
'used' => 'I am used in vendor',
'unused' => 'I am unused in vendor',

'used' => 'I am used in php class',
'unused' => 'I am unused in php class',
'blade' => [
'choice' => [
'used' => 'I am used in vendor',
'unused' => 'I am unused in vendor',
'used' => 'I am used in blade',
'unused' => 'I am unused in blade',
],
'lang' => [
'used' => 'I am used in vendor',
'unused' => 'I am unused in vendor',
'used' => 'I am used in blade',
'unused' => 'I am unused in blade',
],
]
],
'vue' => [
'used' => 'I am used in vue component',
'unused' => 'I am unused in vue component',
],
];
19 changes: 11 additions & 8 deletions workbench/vendor/example/lang/en/folder/example.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
<?php

return [
'used' => 'I am used',
'unused' => 'I am unused',

'used' => 'I am used in php class',
'unused' => 'I am unused in php class',
'blade' => [
'choice' => [
'used' => 'I am used',
'unused' => 'I am unused',
'used' => 'I am used in blade',
'unused' => 'I am unused in blade',
],
'lang' => [
'used' => 'I am used',
'unused' => 'I am unused',
'used' => 'I am used in blade',
'unused' => 'I am unused in blade',
],
]
],
'vue' => [
'used' => 'I am used in vue component',
'unused' => 'I am unused in vue component',
],
];

0 comments on commit 97b7bb1

Please sign in to comment.